├── .nvmrc ├── .node-version ├── .eslintignore ├── .prettierignore ├── .prettierrc.json ├── .github ├── graalvm.json └── workflows │ └── simple.yml ├── action.yml ├── tsconfig.json ├── src ├── setup-graalvm.ts └── installer.ts ├── LICENSE ├── package.json ├── .gitignore ├── .eslintrc.json ├── lib ├── setup-graalvm.js └── installer.js ├── README.md └── dist └── sourcemap-register.js /.nvmrc: -------------------------------------------------------------------------------- 1 | v12.16.1 -------------------------------------------------------------------------------- /.node-version: -------------------------------------------------------------------------------- 1 | 14.9.0 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | lib/ 3 | node_modules/ 4 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | lib/ 3 | node_modules/ 4 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 80, 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": false, 6 | "singleQuote": true, 7 | "trailingComma": "none", 8 | "bracketSpacing": false, 9 | "arrowParens": "avoid" 10 | } 11 | -------------------------------------------------------------------------------- /.github/graalvm.json: -------------------------------------------------------------------------------- 1 | { 2 | "problemMatcher": [ 3 | { 4 | "owner": "graalvm", 5 | "pattern": [ 6 | { 7 | "regexp": "^Exception in thread \"(.*)\" (.*): (.*)$", 8 | "code": 2, 9 | "message": 3 10 | } 11 | ] 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'Setup GraalVM environment' 2 | description: 'Setup your runner with GraalVM' 3 | author: 'DeLaGuardo' 4 | branding: 5 | icon: 'gift' 6 | color: 'blue' 7 | inputs: 8 | graalvm-version: 9 | description: '(deparecated) The GraalVM version to make available on the path.' 10 | graalvm: 11 | description: 'The GraalVM version, defaults to 21.0.0.2' 12 | default: '21.0.0.2' 13 | java: 14 | description: 'The Java version GraalVM is based on, defaults to java8' 15 | default: 'java8' 16 | arch: 17 | description: 'The desired architecture. Options are - "amd64" (default), and "aarch64" (for linux only)' 18 | default: 'amd64' 19 | personal-token: 20 | description: 'https://docs.github.com/en/actions/security-guides/automatic-token-authentication' 21 | runs: 22 | using: 'node12' 23 | main: 'dist/index.js' 24 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ 4 | "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ 5 | "outDir": "./lib", /* Redirect output structure to the directory. */ 6 | "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ 7 | "strict": true, /* Enable all strict type-checking options. */ 8 | "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ 9 | "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 10 | }, 11 | "exclude": ["node_modules", "**/*.test.ts"] 12 | } 13 | -------------------------------------------------------------------------------- /src/setup-graalvm.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core' 2 | import * as installer from './installer' 3 | import * as path from 'path' 4 | 5 | async function run(): Promise { 6 | try { 7 | const deprecatedVersion = core.getInput('graalvm-version') 8 | 9 | const graalvm = core.getInput('graalvm') 10 | const java = core.getInput('java') 11 | const arch = core.getInput('arch') 12 | 13 | if (deprecatedVersion) { 14 | const versionParts = deprecatedVersion.match(/(.*)\.(java\d{1,2})$/) 15 | if (versionParts) { 16 | await installer.getGraalVM(versionParts[1], versionParts[2], arch) 17 | } 18 | } else if (graalvm === 'nightly') { 19 | const token = core.getInput('personal-token') 20 | await installer.getNightlyBuild(java, arch, token) 21 | } else { 22 | await installer.getGraalVM(graalvm, java, arch) 23 | } 24 | 25 | const matchersPath = path.join(__dirname, '..', '.github') 26 | core.info(`##[add-matcher]${path.join(matchersPath, 'graalvm.json')}`) 27 | } catch (error) { 28 | core.setFailed(error.message) 29 | } 30 | } 31 | 32 | run() 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 GitHub, Inc. and contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "setup-graalvm", 3 | "version": "1.0.0", 4 | "private": true, 5 | "description": "setup graalvm action", 6 | "main": "lib/setup-graalvm.js", 7 | "scripts": { 8 | "build": "tsc", 9 | "format": "prettier --write **/*.ts", 10 | "format-check": "prettier --check **/*.ts", 11 | "lint": "eslint src/**/*.ts", 12 | "package": "ncc build --source-map", 13 | "all": "npm run build && npm run format && npm run lint && npm run package" 14 | }, 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/DeLaGuardo/setup-graalvm.git" 18 | }, 19 | "keywords": [ 20 | "actions", 21 | "node", 22 | "setup" 23 | ], 24 | "author": "DeLaGuardo", 25 | "license": "MIT", 26 | "dependencies": { 27 | "@actions/core": "^1.2.6", 28 | "@actions/exec": "^1.0.4", 29 | "@actions/github": "^5.0.0", 30 | "@actions/io": "^1.0.2", 31 | "@actions/tool-cache": "^1.6.1" 32 | }, 33 | "devDependencies": { 34 | "@types/node": "^14.14.34", 35 | "@types/semver": "^7.3.4", 36 | "@vercel/ncc": "^0.26.2", 37 | "eslint": "^7.22.0", 38 | "eslint-plugin-github": "^4.1.2", 39 | "prettier": "^2.2.1", 40 | "typescript": "^4.2.3" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Dependency directory 2 | node_modules 3 | 4 | # Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore 5 | # Logs 6 | logs 7 | *.log 8 | npm-debug.log* 9 | yarn-debug.log* 10 | yarn-error.log* 11 | lerna-debug.log* 12 | 13 | # Diagnostic reports (https://nodejs.org/api/report.html) 14 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 15 | 16 | # Runtime data 17 | pids 18 | *.pid 19 | *.seed 20 | *.pid.lock 21 | 22 | # Directory for instrumented libs generated by jscoverage/JSCover 23 | lib-cov 24 | 25 | # Coverage directory used by tools like istanbul 26 | coverage 27 | *.lcov 28 | 29 | # nyc test coverage 30 | .nyc_output 31 | 32 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 33 | .grunt 34 | 35 | # Bower dependency directory (https://bower.io/) 36 | bower_components 37 | 38 | # node-waf configuration 39 | .lock-wscript 40 | 41 | # Compiled binary addons (https://nodejs.org/api/addons.html) 42 | build/Release 43 | 44 | # Dependency directories 45 | jspm_packages/ 46 | 47 | # TypeScript v1 declaration files 48 | typings/ 49 | 50 | # TypeScript cache 51 | *.tsbuildinfo 52 | 53 | # Optional npm cache directory 54 | .npm 55 | 56 | # Optional eslint cache 57 | .eslintcache 58 | 59 | # Optional REPL history 60 | .node_repl_history 61 | 62 | # Output of 'npm pack' 63 | *.tgz 64 | 65 | # Yarn Integrity file 66 | .yarn-integrity 67 | 68 | # dotenv environment variables file 69 | .env 70 | .env.test 71 | 72 | # parcel-bundler cache (https://parceljs.org/) 73 | .cache 74 | 75 | # next.js build output 76 | .next 77 | 78 | # nuxt.js build output 79 | .nuxt 80 | 81 | # vuepress build output 82 | .vuepress/dist 83 | 84 | # Serverless directories 85 | .serverless/ 86 | 87 | # FuseBox cache 88 | .fusebox/ 89 | 90 | # DynamoDB Local files 91 | .dynamodb/ 92 | 93 | # OS metadata 94 | .DS_Store 95 | Thumbs.db 96 | 97 | # Ignore built ts files 98 | __tests__/runner/* 99 | lib/**/* 100 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "@typescript-eslint" 4 | ], 5 | "extends": [ 6 | "plugin:github/recommended" 7 | ], 8 | "parser": "@typescript-eslint/parser", 9 | "parserOptions": { 10 | "ecmaVersion": 9, 11 | "sourceType": "module", 12 | "project": "./tsconfig.json" 13 | }, 14 | "rules": { 15 | "eslint-comments/no-use": "off", 16 | "import/no-namespace": "off", 17 | "no-unused-vars": "off", 18 | "@typescript-eslint/no-unused-vars": "error", 19 | "@typescript-eslint/explicit-member-accessibility": [ 20 | "error", 21 | { 22 | "accessibility": "no-public" 23 | } 24 | ], 25 | "@typescript-eslint/no-require-imports": "error", 26 | "@typescript-eslint/array-type": "error", 27 | "@typescript-eslint/await-thenable": "error", 28 | "@typescript-eslint/ban-ts-comment": "error", 29 | "camelcase": "off", 30 | "@typescript-eslint/consistent-type-assertions": "error", 31 | "@typescript-eslint/explicit-function-return-type": [ 32 | "error", 33 | { 34 | "allowExpressions": true 35 | } 36 | ], 37 | "@typescript-eslint/func-call-spacing": [ 38 | "error", 39 | "never" 40 | ], 41 | "@typescript-eslint/no-array-constructor": "error", 42 | "@typescript-eslint/no-empty-interface": "error", 43 | "@typescript-eslint/no-explicit-any": "error", 44 | "@typescript-eslint/no-extraneous-class": "error", 45 | "@typescript-eslint/no-for-in-array": "error", 46 | "@typescript-eslint/no-inferrable-types": "error", 47 | "@typescript-eslint/no-misused-new": "error", 48 | "@typescript-eslint/no-namespace": "error", 49 | "@typescript-eslint/no-non-null-assertion": "warn", 50 | "@typescript-eslint/no-unnecessary-qualifier": "error", 51 | "@typescript-eslint/no-unnecessary-type-assertion": "error", 52 | "@typescript-eslint/no-useless-constructor": "error", 53 | "@typescript-eslint/no-var-requires": "error", 54 | "@typescript-eslint/prefer-for-of": "warn", 55 | "@typescript-eslint/prefer-function-type": "warn", 56 | "@typescript-eslint/prefer-includes": "error", 57 | "@typescript-eslint/prefer-string-starts-ends-with": "error", 58 | "@typescript-eslint/promise-function-async": "error", 59 | "@typescript-eslint/require-array-sort-compare": "error", 60 | "@typescript-eslint/restrict-plus-operands": "error", 61 | "semi": "off", 62 | "@typescript-eslint/semi": [ 63 | "error", 64 | "never" 65 | ], 66 | "@typescript-eslint/type-annotation-spacing": "error", 67 | "@typescript-eslint/unbound-method": "error" 68 | }, 69 | "env": { 70 | "node": true, 71 | "es6": true 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /lib/setup-graalvm.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 | if (k2 === undefined) k2 = k; 4 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 5 | }) : (function(o, m, k, k2) { 6 | if (k2 === undefined) k2 = k; 7 | o[k2] = m[k]; 8 | })); 9 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 10 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 11 | }) : function(o, v) { 12 | o["default"] = v; 13 | }); 14 | var __importStar = (this && this.__importStar) || function (mod) { 15 | if (mod && mod.__esModule) return mod; 16 | var result = {}; 17 | if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 18 | __setModuleDefault(result, mod); 19 | return result; 20 | }; 21 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 22 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 23 | return new (P || (P = Promise))(function (resolve, reject) { 24 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 25 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 26 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 27 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 28 | }); 29 | }; 30 | Object.defineProperty(exports, "__esModule", { value: true }); 31 | const core = __importStar(require("@actions/core")); 32 | const installer = __importStar(require("./installer")); 33 | const path = __importStar(require("path")); 34 | function run() { 35 | return __awaiter(this, void 0, void 0, function* () { 36 | try { 37 | const deprecatedVersion = core.getInput('graalvm-version'); 38 | const graalvm = core.getInput('graalvm'); 39 | const java = core.getInput('java'); 40 | const arch = core.getInput('arch'); 41 | if (deprecatedVersion) { 42 | const versionParts = deprecatedVersion.match(/(.*)\.(java\d{1,2})$/); 43 | if (versionParts) { 44 | yield installer.getGraalVM(versionParts[1], versionParts[2], arch); 45 | } 46 | } 47 | else if (graalvm === 'nightly') { 48 | const token = core.getInput('personal-token'); 49 | yield installer.getNightlyBuild(java, arch, token); 50 | } 51 | else { 52 | yield installer.getGraalVM(graalvm, java, arch); 53 | } 54 | const matchersPath = path.join(__dirname, '..', '.github'); 55 | core.info(`##[add-matcher]${path.join(matchersPath, 'graalvm.json')}`); 56 | } 57 | catch (error) { 58 | core.setFailed(error.message); 59 | } 60 | }); 61 | } 62 | run(); 63 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # setup-graalvm 2 | 3 | ***This project is no longer maintained. Please consider using [setup-graalvm action from graalvm team](https://github.com/graalvm/setup-graalvm).*** 4 | 5 | This action sets up GraalVM environment for using in GitHub Actions. 6 | 7 | * It downloads (if it is not cached yet) required version of GraalVM Community edition 8 | * Adds executors provided by GraalVM distribution to the environment 9 | * Register problem matchers for error output 10 | 11 | # Notes: 12 | 13 | Since version 19.3.0 each version of graalvm available with modifier to specify version of JDK. java8 and java11 are available atm. 14 | 15 | # Usage 16 | 17 | ```yaml 18 | steps: 19 | - uses: actions/checkout@latest 20 | - uses: DeLaGuardo/setup-graalvm@5.0 21 | with: 22 | # GraalVM version, no pattern syntax available atm 23 | graalvm: '21.0.0.2' 24 | # Java version, optional, defaults to 'java8'. Available options are 'java8' and 'java11'. 25 | java: 'java11' 26 | # Architecture flag, optional, defaults to 'amd64'. Available options are 'amd64' and 'aarch64'. Later is available only for linux runners. 27 | arch: 'amd64' 28 | - run: java -version 29 | ``` 30 | 31 | # Nightly builds 32 | 33 | ``` yaml 34 | steps: 35 | - uses: actions/checkout@latest 36 | - uses: DeLaGuardo/setup-graalvm@5.0 37 | with: 38 | graalvm: 'nightly' 39 | # secret token needed to fetch latest nightly release automatically 40 | personal-token: ${{ secrets.GITHUB_TOKEN }} 41 | # Java version, optional, defaults to 'java8'. Available options are 'java8' and 'java11'. 42 | java: 'java11' 43 | # Architecture flag, optional, defaults to 'amd64'. Available options are 'amd64' and 'aarch64'. Later is available only for linux runners. 44 | arch: 'amd64' 45 | - run: java -version 46 | ``` 47 | 48 | # Using GraalVM Component Updater (aka. gu) 49 | 50 | `gu` binary is available as `gu` on ubuntu and macos, on windows - as `gu.cmd`. 51 | 52 | ``` yaml 53 | jobs: 54 | sample-job: 55 | runs-on: ${{ matrix.os }} 56 | strategy: 57 | matrix: 58 | os: [ubuntu-latest, macos-latest, windows-latest] 59 | gu-binary: [gu, gu.cmd] 60 | exclude: 61 | - os: ubuntu-latest 62 | gu-binary: gu.cmd 63 | - os: macos-latest 64 | gu-binary: gu.cmd 65 | - os: windows-latest 66 | gu-binary: gu 67 | steps: 68 | - name: Setup Graalvm 69 | id: setup-graalvm 70 | uses: DeLaGuardo/setup-graalvm@master 71 | with: 72 | # GraalVM version, no pattern syntax available atm 73 | graalvm: '21.0.0.2' 74 | # Java version, optional, defaults to 'java8'. Available options are 'java8' and 'java11'. 75 | java: 'java11' 76 | # Architecture flag, optional, defaults to 'amd64'. Available options are 'amd64' and 'aarch64'. Later is available only for linux runners. 77 | arch: 'amd64' 78 | 79 | - name: Install native-image component 80 | run: | 81 | ${{ matrix.gu-binary }} install native-image 82 | ``` 83 | 84 | # License 85 | 86 | The scripts and documentation in this project are released under the [MIT License](LICENSE) 87 | -------------------------------------------------------------------------------- /.github/workflows/simple.yml: -------------------------------------------------------------------------------- 1 | name: Simple example of using 2 | 3 | on: [push] 4 | 5 | jobs: 6 | linux: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Setup GraalVM 10 | uses: DeLaGuardo/setup-graalvm@master 11 | with: 12 | graalvm: 21.0.0.2 13 | java: java11 14 | arch: amd64 15 | 16 | - name: Check java binary 17 | run: java -version 18 | 19 | - name: Check gu binary 20 | run: gu install native-image 21 | 22 | linux_deprecated: 23 | runs-on: ubuntu-latest 24 | steps: 25 | - name: Setup GraalVM 26 | uses: DeLaGuardo/setup-graalvm@master 27 | with: 28 | graalvm-version: 21.0.0.2.java11 29 | 30 | - name: Check java binary 31 | run: java -version 32 | 33 | - name: Check gu binary 34 | run: gu install native-image 35 | 36 | simple: 37 | runs-on: ${{ matrix.os }} 38 | strategy: 39 | matrix: 40 | os: [ubuntu-latest, macos-latest, windows-latest] 41 | gu-binary: [gu, gu.cmd] 42 | exclude: 43 | - os: ubuntu-latest 44 | gu-binary: gu.cmd 45 | - os: macos-latest 46 | gu-binary: gu.cmd 47 | - os: windows-latest 48 | gu-binary: gu 49 | steps: 50 | - name: Setup GraalVM 51 | uses: DeLaGuardo/setup-graalvm@master 52 | with: 53 | graalvm: 21.0.0.2 54 | java: java11 55 | 56 | - name: Check java binary 57 | run: java -version 58 | 59 | - name: Check gu binary 60 | run: | 61 | ${{ matrix.gu-binary }} install native-image 62 | 63 | nightly: 64 | runs-on: ${{ matrix.os }} 65 | strategy: 66 | matrix: 67 | os: [ubuntu-latest, macos-latest, windows-latest] 68 | gu-binary: [gu, gu.cmd] 69 | exclude: 70 | - os: ubuntu-latest 71 | gu-binary: gu.cmd 72 | - os: macos-latest 73 | gu-binary: gu.cmd 74 | - os: windows-latest 75 | gu-binary: gu 76 | steps: 77 | - name: Setup GraalVM Nightly Build 78 | uses: DeLaGuardo/setup-graalvm@master 79 | with: 80 | graalvm: 'nightly' 81 | java: java11 82 | personal-token: ${{ secrets.GITHUB_TOKEN }} 83 | 84 | - name: Check java binary 85 | run: java -version 86 | 87 | - name: Check gu binary 88 | run: | 89 | ${{ matrix.gu-binary }} install native-image 90 | 91 | java17: 92 | runs-on: ${{ matrix.os }} 93 | strategy: 94 | matrix: 95 | os: [ubuntu-latest, macos-latest, windows-latest] 96 | gu-binary: [gu, gu.cmd] 97 | exclude: 98 | - os: ubuntu-latest 99 | gu-binary: gu.cmd 100 | - os: macos-latest 101 | gu-binary: gu.cmd 102 | - os: windows-latest 103 | gu-binary: gu 104 | steps: 105 | - name: Setup GraalVM based on java17 106 | uses: DeLaGuardo/setup-graalvm@master 107 | with: 108 | graalvm: '21.3.0' 109 | java: java17 110 | personal-token: ${{ secrets.GITHUB_TOKEN }} 111 | 112 | - name: Check java binary 113 | run: java -version 114 | 115 | - name: Check gu binary 116 | run: | 117 | ${{ matrix.gu-binary }} install native-image 118 | -------------------------------------------------------------------------------- /src/installer.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core' 2 | import * as io from '@actions/io' 3 | import * as exec from '@actions/exec' 4 | import * as tc from '@actions/tool-cache' 5 | import * as github from '@actions/github' 6 | import * as fs from 'fs' 7 | import * as path from 'path' 8 | 9 | let tempDirectory = process.env['RUNNER_TEMP'] || '' 10 | 11 | const IS_WINDOWS = process.platform === 'win32' 12 | 13 | if (!tempDirectory) { 14 | let baseLocation 15 | if (IS_WINDOWS) { 16 | baseLocation = process.env['USERPROFILE'] || 'C:\\' 17 | } else { 18 | if (process.platform === 'darwin') { 19 | baseLocation = '/Users' 20 | } else { 21 | baseLocation = '/home' 22 | } 23 | } 24 | tempDirectory = path.join(baseLocation, 'actions', 'temp') 25 | } 26 | 27 | let platform = '' 28 | 29 | if (IS_WINDOWS) { 30 | platform = 'windows' 31 | } else { 32 | if (process.platform === 'darwin') { 33 | platform = 'darwin' 34 | } else { 35 | platform = 'linux' 36 | } 37 | } 38 | 39 | export async function getGraalVM( 40 | graalvm: string, 41 | java: string, 42 | arch: string 43 | ): Promise { 44 | const version = `${graalvm}.${java}.${arch}` 45 | let toolPath = tc.find('GraalVM', getCacheVersionString(version), arch) 46 | let compressedFileExtension = '' 47 | 48 | const allGraalVMVersions = tc.findAllVersions('GraalVM') 49 | core.info(`Versions of graalvm available: ${allGraalVMVersions}`) 50 | 51 | if (toolPath) { 52 | core.debug(`GraalVM found in cache ${toolPath}`) 53 | } else { 54 | if (java) { 55 | compressedFileExtension = IS_WINDOWS ? '.zip' : '.tar.gz' 56 | const downloadPath = `https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${graalvm}/graalvm-ce-${java}-${platform}-${arch}-${graalvm}${compressedFileExtension}` 57 | 58 | core.info(`Downloading GraalVM from ${downloadPath}`) 59 | 60 | const graalvmFile = await tc.downloadTool(downloadPath) 61 | const tempDir: string = path.join( 62 | tempDirectory, 63 | `temp_${Math.floor(Math.random() * 2000000000)}` 64 | ) 65 | const graalvmDir = await unzipGraalVMDownload( 66 | graalvmFile, 67 | compressedFileExtension, 68 | tempDir 69 | ) 70 | core.debug(`graalvm extracted to ${graalvmDir}`) 71 | toolPath = await tc.cacheDir( 72 | graalvmDir, 73 | 'GraalVM', 74 | getCacheVersionString(version) 75 | ) 76 | } else { 77 | throw new Error('No java version.') 78 | } 79 | } 80 | 81 | const extendedJavaHome = `JAVA_HOME_${version}` 82 | core.exportVariable('JAVA_HOME', toolPath) 83 | core.exportVariable(extendedJavaHome, toolPath) 84 | core.exportVariable('GRAALVM_HOME', toolPath) 85 | core.addPath(path.join(toolPath, 'bin')) 86 | } 87 | 88 | export async function getNightlyBuild( 89 | java: string, 90 | arch: string, 91 | token: string 92 | ): Promise { 93 | const octokit = github.getOctokit(token) 94 | const compressedFileExtension = IS_WINDOWS ? '.zip' : '.tar.gz' 95 | const { 96 | repository: { 97 | releases: { 98 | edges: [ 99 | { 100 | node: { 101 | releaseAssets: { 102 | edges: [ 103 | { 104 | node: { 105 | downloadUrl, 106 | release: { 107 | tag: {name} 108 | } 109 | } 110 | } 111 | ] 112 | } 113 | } 114 | } 115 | ] 116 | } 117 | } 118 | } = await octokit.graphql( 119 | ` 120 | { 121 | repository(owner: "graalvm", name: "graalvm-ce-dev-builds") { 122 | releases(last: 1) { 123 | edges { 124 | node { 125 | releaseAssets(first: 1, name: "graalvm-ce-${java}-${platform}-${arch}-dev${compressedFileExtension}") { 126 | edges { 127 | node { 128 | downloadUrl 129 | release { 130 | tag { 131 | name 132 | } 133 | } 134 | } 135 | } 136 | } 137 | } 138 | } 139 | } 140 | } 141 | } 142 | ` 143 | ) 144 | 145 | const version = `${name}.${java}.${arch}` 146 | let toolPath = tc.find('GraalVM', getCacheVersionString(version), arch) 147 | 148 | if (toolPath) { 149 | core.debug(`GraalVM found in cache ${toolPath}`) 150 | } else { 151 | core.info(`Downloading Nightly GraalVM from ${downloadUrl}`) 152 | 153 | const graalvmFile = await tc.downloadTool(downloadUrl) 154 | const tempDir: string = path.join( 155 | tempDirectory, 156 | `temp_${Math.floor(Math.random() * 2000000000)}` 157 | ) 158 | const graalvmDir = await unzipGraalVMDownload( 159 | graalvmFile, 160 | compressedFileExtension, 161 | tempDir 162 | ) 163 | core.debug(`graalvm extracted to ${graalvmDir}`) 164 | toolPath = await tc.cacheDir( 165 | graalvmDir, 166 | 'GraalVM', 167 | getCacheVersionString(version) 168 | ) 169 | } 170 | 171 | core.exportVariable('JAVA_HOME', toolPath) 172 | core.exportVariable('JAVA_HOME_NIGHTLY', toolPath) 173 | core.exportVariable('GRAALVM_HOME', toolPath) 174 | core.addPath(path.join(toolPath, 'bin')) 175 | } 176 | 177 | function getCacheVersionString(version: string): string { 178 | const versionArray = version.split('.') 179 | const major = versionArray[0] 180 | const minor = versionArray.length > 1 ? versionArray[1] : '0' 181 | const patch = versionArray.length > 2 ? versionArray.slice(2).join('-') : '0' 182 | return `${major}.${minor}.${patch}` 183 | } 184 | 185 | async function extractFiles( 186 | file: string, 187 | fileEnding: string, 188 | destinationFolder: string 189 | ): Promise { 190 | const stats = fs.statSync(file) 191 | if (!stats) { 192 | throw new Error(`Failed to extract ${file} - it doesn't exist`) 193 | } else if (stats.isDirectory()) { 194 | throw new Error(`Failed to extract ${file} - it is a directory`) 195 | } 196 | 197 | if ('.tar.gz' === fileEnding) { 198 | await tc.extractTar(file, destinationFolder) 199 | } else if ('.zip' === fileEnding) { 200 | await tc.extractZip(file, destinationFolder) 201 | } 202 | } 203 | 204 | async function unpackJars(fsPath: string, javaBinPath: string): Promise { 205 | if (fs.existsSync(fsPath)) { 206 | if (fs.lstatSync(fsPath).isDirectory()) { 207 | for (const file of fs.readdirSync(fsPath)) { 208 | const curPath = path.join(fsPath, file) 209 | await unpackJars(curPath, javaBinPath) 210 | } 211 | } else if (path.extname(fsPath).toLowerCase() === '.pack') { 212 | // Unpack the pack file synchonously 213 | const p = path.parse(fsPath) 214 | const toolName = IS_WINDOWS ? 'unpack200.exe' : 'unpack200' 215 | const args = IS_WINDOWS ? '-r -v -l ""' : '' 216 | const name = path.join(p.dir, p.name) 217 | await exec.exec(`"${path.join(javaBinPath, toolName)}"`, [ 218 | `${args} "${name}.pack" "${name}.jar"` 219 | ]) 220 | } 221 | } 222 | } 223 | 224 | async function unzipGraalVMDownload( 225 | repoRoot: string, 226 | fileEnding: string, 227 | destinationFolder: string 228 | ): Promise { 229 | await io.mkdirP(destinationFolder) 230 | 231 | const graalvmFile = path.normalize(repoRoot) 232 | const stats = fs.statSync(graalvmFile) 233 | if (stats.isFile()) { 234 | await extractFiles(graalvmFile, fileEnding, destinationFolder) 235 | const graalvmFolder = fs.readdirSync(destinationFolder)[0] 236 | if (process.platform === 'darwin') { 237 | for (const f of fs.readdirSync( 238 | path.join(destinationFolder, graalvmFolder, 'Contents', 'Home') 239 | )) { 240 | await io.cp( 241 | path.join(destinationFolder, graalvmFolder, 'Contents', 'Home', f), 242 | path.join(destinationFolder, graalvmFolder, f), 243 | {recursive: true} 244 | ) 245 | } 246 | await io.rmRF(path.join(destinationFolder, graalvmFolder, 'Contents')) 247 | } 248 | const graalvmDirectory = path.join(destinationFolder, graalvmFolder) 249 | await unpackJars(graalvmDirectory, path.join(graalvmDirectory, 'bin')) 250 | return graalvmDirectory 251 | } else { 252 | throw new Error(`Jdk argument ${graalvmFile} is not a file`) 253 | } 254 | } 255 | -------------------------------------------------------------------------------- /lib/installer.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 | if (k2 === undefined) k2 = k; 4 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 5 | }) : (function(o, m, k, k2) { 6 | if (k2 === undefined) k2 = k; 7 | o[k2] = m[k]; 8 | })); 9 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 10 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 11 | }) : function(o, v) { 12 | o["default"] = v; 13 | }); 14 | var __importStar = (this && this.__importStar) || function (mod) { 15 | if (mod && mod.__esModule) return mod; 16 | var result = {}; 17 | if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 18 | __setModuleDefault(result, mod); 19 | return result; 20 | }; 21 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 22 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 23 | return new (P || (P = Promise))(function (resolve, reject) { 24 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 25 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 26 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 27 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 28 | }); 29 | }; 30 | Object.defineProperty(exports, "__esModule", { value: true }); 31 | exports.getNightlyBuild = exports.getGraalVM = void 0; 32 | const core = __importStar(require("@actions/core")); 33 | const io = __importStar(require("@actions/io")); 34 | const exec = __importStar(require("@actions/exec")); 35 | const tc = __importStar(require("@actions/tool-cache")); 36 | const github = __importStar(require("@actions/github")); 37 | const fs = __importStar(require("fs")); 38 | const path = __importStar(require("path")); 39 | let tempDirectory = process.env['RUNNER_TEMP'] || ''; 40 | const IS_WINDOWS = process.platform === 'win32'; 41 | if (!tempDirectory) { 42 | let baseLocation; 43 | if (IS_WINDOWS) { 44 | baseLocation = process.env['USERPROFILE'] || 'C:\\'; 45 | } 46 | else { 47 | if (process.platform === 'darwin') { 48 | baseLocation = '/Users'; 49 | } 50 | else { 51 | baseLocation = '/home'; 52 | } 53 | } 54 | tempDirectory = path.join(baseLocation, 'actions', 'temp'); 55 | } 56 | let platform = ''; 57 | if (IS_WINDOWS) { 58 | platform = 'windows'; 59 | } 60 | else { 61 | if (process.platform === 'darwin') { 62 | platform = 'darwin'; 63 | } 64 | else { 65 | platform = 'linux'; 66 | } 67 | } 68 | function getGraalVM(graalvm, java, arch) { 69 | return __awaiter(this, void 0, void 0, function* () { 70 | const version = `${graalvm}.${java}.${arch}`; 71 | let toolPath = tc.find('GraalVM', getCacheVersionString(version), arch); 72 | let compressedFileExtension = ''; 73 | const allGraalVMVersions = tc.findAllVersions('GraalVM'); 74 | core.info(`Versions of graalvm available: ${allGraalVMVersions}`); 75 | if (toolPath) { 76 | core.debug(`GraalVM found in cache ${toolPath}`); 77 | } 78 | else { 79 | if (java) { 80 | compressedFileExtension = IS_WINDOWS ? '.zip' : '.tar.gz'; 81 | const downloadPath = `https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${graalvm}/graalvm-ce-${java}-${platform}-${arch}-${graalvm}${compressedFileExtension}`; 82 | core.info(`Downloading GraalVM from ${downloadPath}`); 83 | const graalvmFile = yield tc.downloadTool(downloadPath); 84 | const tempDir = path.join(tempDirectory, `temp_${Math.floor(Math.random() * 2000000000)}`); 85 | const graalvmDir = yield unzipGraalVMDownload(graalvmFile, compressedFileExtension, tempDir); 86 | core.debug(`graalvm extracted to ${graalvmDir}`); 87 | toolPath = yield tc.cacheDir(graalvmDir, 'GraalVM', getCacheVersionString(version)); 88 | } 89 | else { 90 | throw new Error('No java version.'); 91 | } 92 | } 93 | const extendedJavaHome = `JAVA_HOME_${version}`; 94 | core.exportVariable('JAVA_HOME', toolPath); 95 | core.exportVariable(extendedJavaHome, toolPath); 96 | core.exportVariable('GRAALVM_HOME', toolPath); 97 | core.addPath(path.join(toolPath, 'bin')); 98 | }); 99 | } 100 | exports.getGraalVM = getGraalVM; 101 | function getNightlyBuild(java, arch, token) { 102 | return __awaiter(this, void 0, void 0, function* () { 103 | const octokit = github.getOctokit(token); 104 | const compressedFileExtension = IS_WINDOWS ? '.zip' : '.tar.gz'; 105 | const { repository: { releases: { edges: [{ node: { releaseAssets: { edges: [{ node: { downloadUrl, release: { tag: { name } } } }] } } }] } } } = yield octokit.graphql(` 106 | { 107 | repository(owner: "graalvm", name: "graalvm-ce-dev-builds") { 108 | releases(last: 1) { 109 | edges { 110 | node { 111 | releaseAssets(first: 1, name: "graalvm-ce-${java}-${platform}-${arch}-dev${compressedFileExtension}") { 112 | edges { 113 | node { 114 | downloadUrl 115 | release { 116 | tag { 117 | name 118 | } 119 | } 120 | } 121 | } 122 | } 123 | } 124 | } 125 | } 126 | } 127 | } 128 | `); 129 | const version = `${name}.${java}.${arch}`; 130 | let toolPath = tc.find('GraalVM', getCacheVersionString(version), arch); 131 | if (toolPath) { 132 | core.debug(`GraalVM found in cache ${toolPath}`); 133 | } 134 | else { 135 | core.info(`Downloading Nightly GraalVM from ${downloadUrl}`); 136 | const graalvmFile = yield tc.downloadTool(downloadUrl); 137 | const tempDir = path.join(tempDirectory, `temp_${Math.floor(Math.random() * 2000000000)}`); 138 | const graalvmDir = yield unzipGraalVMDownload(graalvmFile, compressedFileExtension, tempDir); 139 | core.debug(`graalvm extracted to ${graalvmDir}`); 140 | toolPath = yield tc.cacheDir(graalvmDir, 'GraalVM', getCacheVersionString(version)); 141 | } 142 | core.exportVariable('JAVA_HOME', toolPath); 143 | core.exportVariable('JAVA_HOME_NIGHTLY', toolPath); 144 | core.exportVariable('GRAALVM_HOME', toolPath); 145 | core.addPath(path.join(toolPath, 'bin')); 146 | }); 147 | } 148 | exports.getNightlyBuild = getNightlyBuild; 149 | function getCacheVersionString(version) { 150 | const versionArray = version.split('.'); 151 | const major = versionArray[0]; 152 | const minor = versionArray.length > 1 ? versionArray[1] : '0'; 153 | const patch = versionArray.length > 2 ? versionArray.slice(2).join('-') : '0'; 154 | return `${major}.${minor}.${patch}`; 155 | } 156 | function extractFiles(file, fileEnding, destinationFolder) { 157 | return __awaiter(this, void 0, void 0, function* () { 158 | const stats = fs.statSync(file); 159 | if (!stats) { 160 | throw new Error(`Failed to extract ${file} - it doesn't exist`); 161 | } 162 | else if (stats.isDirectory()) { 163 | throw new Error(`Failed to extract ${file} - it is a directory`); 164 | } 165 | if ('.tar.gz' === fileEnding) { 166 | yield tc.extractTar(file, destinationFolder); 167 | } 168 | else if ('.zip' === fileEnding) { 169 | yield tc.extractZip(file, destinationFolder); 170 | } 171 | }); 172 | } 173 | function unpackJars(fsPath, javaBinPath) { 174 | return __awaiter(this, void 0, void 0, function* () { 175 | if (fs.existsSync(fsPath)) { 176 | if (fs.lstatSync(fsPath).isDirectory()) { 177 | for (const file of fs.readdirSync(fsPath)) { 178 | const curPath = path.join(fsPath, file); 179 | yield unpackJars(curPath, javaBinPath); 180 | } 181 | } 182 | else if (path.extname(fsPath).toLowerCase() === '.pack') { 183 | // Unpack the pack file synchonously 184 | const p = path.parse(fsPath); 185 | const toolName = IS_WINDOWS ? 'unpack200.exe' : 'unpack200'; 186 | const args = IS_WINDOWS ? '-r -v -l ""' : ''; 187 | const name = path.join(p.dir, p.name); 188 | yield exec.exec(`"${path.join(javaBinPath, toolName)}"`, [ 189 | `${args} "${name}.pack" "${name}.jar"` 190 | ]); 191 | } 192 | } 193 | }); 194 | } 195 | function unzipGraalVMDownload(repoRoot, fileEnding, destinationFolder) { 196 | return __awaiter(this, void 0, void 0, function* () { 197 | yield io.mkdirP(destinationFolder); 198 | const graalvmFile = path.normalize(repoRoot); 199 | const stats = fs.statSync(graalvmFile); 200 | if (stats.isFile()) { 201 | yield extractFiles(graalvmFile, fileEnding, destinationFolder); 202 | const graalvmFolder = fs.readdirSync(destinationFolder)[0]; 203 | if (process.platform === 'darwin') { 204 | for (const f of fs.readdirSync(path.join(destinationFolder, graalvmFolder, 'Contents', 'Home'))) { 205 | yield io.cp(path.join(destinationFolder, graalvmFolder, 'Contents', 'Home', f), path.join(destinationFolder, graalvmFolder, f), { recursive: true }); 206 | } 207 | yield io.rmRF(path.join(destinationFolder, graalvmFolder, 'Contents')); 208 | } 209 | const graalvmDirectory = path.join(destinationFolder, graalvmFolder); 210 | yield unpackJars(graalvmDirectory, path.join(graalvmDirectory, 'bin')); 211 | return graalvmDirectory; 212 | } 213 | else { 214 | throw new Error(`Jdk argument ${graalvmFile} is not a file`); 215 | } 216 | }); 217 | } 218 | -------------------------------------------------------------------------------- /dist/sourcemap-register.js: -------------------------------------------------------------------------------- 1 | module.exports=(()=>{var e={650:e=>{var r=Object.prototype.toString;var n=typeof Buffer.alloc==="function"&&typeof Buffer.allocUnsafe==="function"&&typeof Buffer.from==="function";function isArrayBuffer(e){return r.call(e).slice(8,-1)==="ArrayBuffer"}function fromArrayBuffer(e,r,t){r>>>=0;var o=e.byteLength-r;if(o<0){throw new RangeError("'offset' is out of bounds")}if(t===undefined){t=o}else{t>>>=0;if(t>o){throw new RangeError("'length' is out of bounds")}}return n?Buffer.from(e.slice(r,r+t)):new Buffer(new Uint8Array(e.slice(r,r+t)))}function fromString(e,r){if(typeof r!=="string"||r===""){r="utf8"}if(!Buffer.isEncoding(r)){throw new TypeError('"encoding" must be a valid string encoding')}return n?Buffer.from(e,r):new Buffer(e,r)}function bufferFrom(e,r,t){if(typeof e==="number"){throw new TypeError('"value" argument must not be a number')}if(isArrayBuffer(e)){return fromArrayBuffer(e,r,t)}if(typeof e==="string"){return fromString(e,r)}return n?Buffer.from(e):new Buffer(e)}e.exports=bufferFrom},645:(e,r,n)=>{n(284).install()},284:(e,r,n)=>{var t=n(596).SourceMapConsumer;var o=n(622);var i;try{i=n(747);if(!i.existsSync||!i.readFileSync){i=null}}catch(e){}var u=n(650);var s=false;var a=false;var l=false;var c="auto";var f={};var p={};var g=/^data:application\/json[^,]+base64,/;var h=[];var d=[];function isInBrowser(){if(c==="browser")return true;if(c==="node")return false;return typeof window!=="undefined"&&typeof XMLHttpRequest==="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function hasGlobalProcessEventEmitter(){return typeof process==="object"&&process!==null&&typeof process.on==="function"}function handlerExec(e){return function(r){for(var n=0;n"}var n=this.getLineNumber();if(n!=null){r+=":"+n;var t=this.getColumnNumber();if(t){r+=":"+t}}}var o="";var i=this.getFunctionName();var u=true;var s=this.isConstructor();var a=!(this.isToplevel()||s);if(a){var l=this.getTypeName();if(l==="[object Object]"){l="null"}var c=this.getMethodName();if(i){if(l&&i.indexOf(l)!=0){o+=l+"."}o+=i;if(c&&i.indexOf("."+c)!=i.length-c.length-1){o+=" [as "+c+"]"}}else{o+=l+"."+(c||"")}}else if(s){o+="new "+(i||"")}else if(i){o+=i}else{o+=r;u=false}if(u){o+=" ("+r+")"}return o}function cloneCallSite(e){var r={};Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(function(n){r[n]=/^(?:is|get)/.test(n)?function(){return e[n].call(e)}:e[n]});r.toString=CallSiteToString;return r}function wrapCallSite(e){if(e.isNative()){return e}var r=e.getFileName()||e.getScriptNameOrSourceURL();if(r){var n=e.getLineNumber();var t=e.getColumnNumber()-1;var o=62;if(n===1&&t>o&&!isInBrowser()&&!e.isEval()){t-=o}var i=mapSourcePosition({source:r,line:n,column:t});e=cloneCallSite(e);var u=e.getFunctionName;e.getFunctionName=function(){return i.name||u()};e.getFileName=function(){return i.source};e.getLineNumber=function(){return i.line};e.getColumnNumber=function(){return i.column+1};e.getScriptNameOrSourceURL=function(){return i.source};return e}var s=e.isEval()&&e.getEvalOrigin();if(s){s=mapEvalOrigin(s);e=cloneCallSite(e);e.getEvalOrigin=function(){return s};return e}return e}function prepareStackTrace(e,r){if(l){f={};p={}}return e+r.map(function(e){return"\n at "+wrapCallSite(e)}).join("")}function getErrorSource(e){var r=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(r){var n=r[1];var t=+r[2];var o=+r[3];var u=f[n];if(!u&&i&&i.existsSync(n)){try{u=i.readFileSync(n,"utf8")}catch(e){u=""}}if(u){var s=u.split(/(?:\r\n|\r|\n)/)[t-1];if(s){return n+":"+t+"\n"+s+"\n"+new Array(o).join(" ")+"^"}}}return null}function printErrorAndExit(e){var r=getErrorSource(e);if(process.stderr._handle&&process.stderr._handle.setBlocking){process.stderr._handle.setBlocking(true)}if(r){console.error();console.error(r)}console.error(e.stack);process.exit(1)}function shimEmitUncaughtException(){var e=process.emit;process.emit=function(r){if(r==="uncaughtException"){var n=arguments[1]&&arguments[1].stack;var t=this.listeners(r).length>0;if(n&&!t){return printErrorAndExit(arguments[1])}}return e.apply(this,arguments)}}var S=h.slice(0);var m=d.slice(0);r.wrapCallSite=wrapCallSite;r.getErrorSource=getErrorSource;r.mapSourcePosition=mapSourcePosition;r.retrieveSourceMap=_;r.install=function(e){e=e||{};if(e.environment){c=e.environment;if(["node","browser","auto"].indexOf(c)===-1){throw new Error("environment "+c+" was unknown. Available options are {auto, browser, node}")}}if(e.retrieveFile){if(e.overrideRetrieveFile){h.length=0}h.unshift(e.retrieveFile)}if(e.retrieveSourceMap){if(e.overrideRetrieveSourceMap){d.length=0}d.unshift(e.retrieveSourceMap)}if(e.hookRequire&&!isInBrowser()){var r;try{r=n(282)}catch(e){}var t=r.prototype._compile;if(!t.__sourceMapSupport){r.prototype._compile=function(e,r){f[r]=e;p[r]=undefined;return t.call(this,e,r)};r.prototype._compile.__sourceMapSupport=true}}if(!l){l="emptyCacheBetweenOperations"in e?e.emptyCacheBetweenOperations:false}if(!s){s=true;Error.prepareStackTrace=prepareStackTrace}if(!a){var o="handleUncaughtExceptions"in e?e.handleUncaughtExceptions:true;if(o&&hasGlobalProcessEventEmitter()){a=true;shimEmitUncaughtException()}}};r.resetRetrieveHandlers=function(){h.length=0;d.length=0;h=S.slice(0);d=m.slice(0)}},837:(e,r,n)=>{var t=n(983);var o=Object.prototype.hasOwnProperty;var i=typeof Map!=="undefined";function ArraySet(){this._array=[];this._set=i?new Map:Object.create(null)}ArraySet.fromArray=function ArraySet_fromArray(e,r){var n=new ArraySet;for(var t=0,o=e.length;t=0){return r}}else{var n=t.toSetString(e);if(o.call(this._set,n)){return this._set[n]}}throw new Error('"'+e+'" is not in the set.')};ArraySet.prototype.at=function ArraySet_at(e){if(e>=0&&e{var t=n(537);var o=5;var i=1<>1;return r?-n:n}r.encode=function base64VLQ_encode(e){var r="";var n;var i=toVLQSigned(e);do{n=i&u;i>>>=o;if(i>0){n|=s}r+=t.encode(n)}while(i>0);return r};r.decode=function base64VLQ_decode(e,r,n){var i=e.length;var a=0;var l=0;var c,f;do{if(r>=i){throw new Error("Expected more digits in base 64 VLQ value.")}f=t.decode(e.charCodeAt(r++));if(f===-1){throw new Error("Invalid base64 digit: "+e.charAt(r-1))}c=!!(f&s);f&=u;a=a+(f<{var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(e){if(0<=e&&e{r.GREATEST_LOWER_BOUND=1;r.LEAST_UPPER_BOUND=2;function recursiveSearch(e,n,t,o,i,u){var s=Math.floor((n-e)/2)+e;var a=i(t,o[s],true);if(a===0){return s}else if(a>0){if(n-s>1){return recursiveSearch(s,n,t,o,i,u)}if(u==r.LEAST_UPPER_BOUND){return n1){return recursiveSearch(e,s,t,o,i,u)}if(u==r.LEAST_UPPER_BOUND){return s}else{return e<0?-1:e}}}r.search=function search(e,n,t,o){if(n.length===0){return-1}var i=recursiveSearch(-1,n.length,e,n,t,o||r.GREATEST_LOWER_BOUND);if(i<0){return-1}while(i-1>=0){if(t(n[i],n[i-1],true)!==0){break}--i}return i}},740:(e,r,n)=>{var t=n(983);function generatedPositionAfter(e,r){var n=e.generatedLine;var o=r.generatedLine;var i=e.generatedColumn;var u=r.generatedColumn;return o>n||o==n&&u>=i||t.compareByGeneratedPositionsInflated(e,r)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(e,r){this._array.forEach(e,r)};MappingList.prototype.add=function MappingList_add(e){if(generatedPositionAfter(this._last,e)){this._last=e;this._array.push(e)}else{this._sorted=false;this._array.push(e)}};MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(t.compareByGeneratedPositionsInflated);this._sorted=true}return this._array};r.H=MappingList},226:(e,r)=>{function swap(e,r,n){var t=e[r];e[r]=e[n];e[n]=t}function randomIntInRange(e,r){return Math.round(e+Math.random()*(r-e))}function doQuickSort(e,r,n,t){if(n{var t;var o=n(983);var i=n(164);var u=n(837).I;var s=n(215);var a=n(226).U;function SourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}return n.sections!=null?new IndexedSourceMapConsumer(n,r):new BasicSourceMapConsumer(n,r)}SourceMapConsumer.fromSourceMap=function(e,r){return BasicSourceMapConsumer.fromSourceMap(e,r)};SourceMapConsumer.prototype._version=3;SourceMapConsumer.prototype.__generatedMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{configurable:true,enumerable:true,get:function(){if(!this.__generatedMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});SourceMapConsumer.prototype.__originalMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{configurable:true,enumerable:true,get:function(){if(!this.__originalMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});SourceMapConsumer.prototype._charIsMappingSeparator=function SourceMapConsumer_charIsMappingSeparator(e,r){var n=e.charAt(r);return n===";"||n===","};SourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(e,r){throw new Error("Subclasses must implement _parseMappings")};SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.GREATEST_LOWER_BOUND=1;SourceMapConsumer.LEAST_UPPER_BOUND=2;SourceMapConsumer.prototype.eachMapping=function SourceMapConsumer_eachMapping(e,r,n){var t=r||null;var i=n||SourceMapConsumer.GENERATED_ORDER;var u;switch(i){case SourceMapConsumer.GENERATED_ORDER:u=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:u=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var s=this.sourceRoot;u.map(function(e){var r=e.source===null?null:this._sources.at(e.source);r=o.computeSourceURL(s,r,this._sourceMapURL);return{source:r,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name===null?null:this._names.at(e.name)}},this).forEach(e,t)};SourceMapConsumer.prototype.allGeneratedPositionsFor=function SourceMapConsumer_allGeneratedPositionsFor(e){var r=o.getArg(e,"line");var n={source:o.getArg(e,"source"),originalLine:r,originalColumn:o.getArg(e,"column",0)};n.source=this._findSourceIndex(n.source);if(n.source<0){return[]}var t=[];var u=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,i.LEAST_UPPER_BOUND);if(u>=0){var s=this._originalMappings[u];if(e.column===undefined){var a=s.originalLine;while(s&&s.originalLine===a){t.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)});s=this._originalMappings[++u]}}else{var l=s.originalColumn;while(s&&s.originalLine===r&&s.originalColumn==l){t.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)});s=this._originalMappings[++u]}}}return t};r.SourceMapConsumer=SourceMapConsumer;function BasicSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}var t=o.getArg(n,"version");var i=o.getArg(n,"sources");var s=o.getArg(n,"names",[]);var a=o.getArg(n,"sourceRoot",null);var l=o.getArg(n,"sourcesContent",null);var c=o.getArg(n,"mappings");var f=o.getArg(n,"file",null);if(t!=this._version){throw new Error("Unsupported version: "+t)}if(a){a=o.normalize(a)}i=i.map(String).map(o.normalize).map(function(e){return a&&o.isAbsolute(a)&&o.isAbsolute(e)?o.relative(a,e):e});this._names=u.fromArray(s.map(String),true);this._sources=u.fromArray(i,true);this._absoluteSources=this._sources.toArray().map(function(e){return o.computeSourceURL(a,e,r)});this.sourceRoot=a;this.sourcesContent=l;this._mappings=c;this._sourceMapURL=r;this.file=f}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;BasicSourceMapConsumer.prototype._findSourceIndex=function(e){var r=e;if(this.sourceRoot!=null){r=o.relative(this.sourceRoot,r)}if(this._sources.has(r)){return this._sources.indexOf(r)}var n;for(n=0;n1){_.source=l+m[1];l+=m[1];_.originalLine=i+m[2];i=_.originalLine;_.originalLine+=1;_.originalColumn=u+m[3];u=_.originalColumn;if(m.length>4){_.name=c+m[4];c+=m[4]}}v.push(_);if(typeof _.originalLine==="number"){d.push(_)}}}a(v,o.compareByGeneratedPositionsDeflated);this.__generatedMappings=v;a(d,o.compareByOriginalPositions);this.__originalMappings=d};BasicSourceMapConsumer.prototype._findMapping=function SourceMapConsumer_findMapping(e,r,n,t,o,u){if(e[n]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+e[n])}if(e[t]<0){throw new TypeError("Column must be greater than or equal to 0, got "+e[t])}return i.search(e,r,o,u)};BasicSourceMapConsumer.prototype.computeColumnSpans=function SourceMapConsumer_computeColumnSpans(){for(var e=0;e=0){var t=this._generatedMappings[n];if(t.generatedLine===r.generatedLine){var i=o.getArg(t,"source",null);if(i!==null){i=this._sources.at(i);i=o.computeSourceURL(this.sourceRoot,i,this._sourceMapURL)}var u=o.getArg(t,"name",null);if(u!==null){u=this._names.at(u)}return{source:i,line:o.getArg(t,"originalLine",null),column:o.getArg(t,"originalColumn",null),name:u}}}return{source:null,line:null,column:null,name:null}};BasicSourceMapConsumer.prototype.hasContentsOfAllSources=function BasicSourceMapConsumer_hasContentsOfAllSources(){if(!this.sourcesContent){return false}return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null})};BasicSourceMapConsumer.prototype.sourceContentFor=function SourceMapConsumer_sourceContentFor(e,r){if(!this.sourcesContent){return null}var n=this._findSourceIndex(e);if(n>=0){return this.sourcesContent[n]}var t=e;if(this.sourceRoot!=null){t=o.relative(this.sourceRoot,t)}var i;if(this.sourceRoot!=null&&(i=o.urlParse(this.sourceRoot))){var u=t.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(u)){return this.sourcesContent[this._sources.indexOf(u)]}if((!i.path||i.path=="/")&&this._sources.has("/"+t)){return this.sourcesContent[this._sources.indexOf("/"+t)]}}if(r){return null}else{throw new Error('"'+t+'" is not in the SourceMap.')}};BasicSourceMapConsumer.prototype.generatedPositionFor=function SourceMapConsumer_generatedPositionFor(e){var r=o.getArg(e,"source");r=this._findSourceIndex(r);if(r<0){return{line:null,column:null,lastColumn:null}}var n={source:r,originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")};var t=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(e,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(t>=0){var i=this._originalMappings[t];if(i.source===n.source){return{line:o.getArg(i,"generatedLine",null),column:o.getArg(i,"generatedColumn",null),lastColumn:o.getArg(i,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}};t=BasicSourceMapConsumer;function IndexedSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}var t=o.getArg(n,"version");var i=o.getArg(n,"sections");if(t!=this._version){throw new Error("Unsupported version: "+t)}this._sources=new u;this._names=new u;var s={line:-1,column:0};this._sections=i.map(function(e){if(e.url){throw new Error("Support for url field in sections not implemented.")}var n=o.getArg(e,"offset");var t=o.getArg(n,"line");var i=o.getArg(n,"column");if(t{var t=n(215);var o=n(983);var i=n(837).I;var u=n(740).H;function SourceMapGenerator(e){if(!e){e={}}this._file=o.getArg(e,"file",null);this._sourceRoot=o.getArg(e,"sourceRoot",null);this._skipValidation=o.getArg(e,"skipValidation",false);this._sources=new i;this._names=new i;this._mappings=new u;this._sourcesContents=null}SourceMapGenerator.prototype._version=3;SourceMapGenerator.fromSourceMap=function SourceMapGenerator_fromSourceMap(e){var r=e.sourceRoot;var n=new SourceMapGenerator({file:e.file,sourceRoot:r});e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};if(e.source!=null){t.source=e.source;if(r!=null){t.source=o.relative(r,t.source)}t.original={line:e.originalLine,column:e.originalColumn};if(e.name!=null){t.name=e.name}}n.addMapping(t)});e.sources.forEach(function(t){var i=t;if(r!==null){i=o.relative(r,t)}if(!n._sources.has(i)){n._sources.add(i)}var u=e.sourceContentFor(t);if(u!=null){n.setSourceContent(t,u)}});return n};SourceMapGenerator.prototype.addMapping=function SourceMapGenerator_addMapping(e){var r=o.getArg(e,"generated");var n=o.getArg(e,"original",null);var t=o.getArg(e,"source",null);var i=o.getArg(e,"name",null);if(!this._skipValidation){this._validateMapping(r,n,t,i)}if(t!=null){t=String(t);if(!this._sources.has(t)){this._sources.add(t)}}if(i!=null){i=String(i);if(!this._names.has(i)){this._names.add(i)}}this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:t,name:i})};SourceMapGenerator.prototype.setSourceContent=function SourceMapGenerator_setSourceContent(e,r){var n=e;if(this._sourceRoot!=null){n=o.relative(this._sourceRoot,n)}if(r!=null){if(!this._sourcesContents){this._sourcesContents=Object.create(null)}this._sourcesContents[o.toSetString(n)]=r}else if(this._sourcesContents){delete this._sourcesContents[o.toSetString(n)];if(Object.keys(this._sourcesContents).length===0){this._sourcesContents=null}}};SourceMapGenerator.prototype.applySourceMap=function SourceMapGenerator_applySourceMap(e,r,n){var t=r;if(r==null){if(e.file==null){throw new Error("SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, "+'or the source map\'s "file" property. Both were omitted.')}t=e.file}var u=this._sourceRoot;if(u!=null){t=o.relative(u,t)}var s=new i;var a=new i;this._mappings.unsortedForEach(function(r){if(r.source===t&&r.originalLine!=null){var i=e.originalPositionFor({line:r.originalLine,column:r.originalColumn});if(i.source!=null){r.source=i.source;if(n!=null){r.source=o.join(n,r.source)}if(u!=null){r.source=o.relative(u,r.source)}r.originalLine=i.line;r.originalColumn=i.column;if(i.name!=null){r.name=i.name}}}var l=r.source;if(l!=null&&!s.has(l)){s.add(l)}var c=r.name;if(c!=null&&!a.has(c)){a.add(c)}},this);this._sources=s;this._names=a;e.sources.forEach(function(r){var t=e.sourceContentFor(r);if(t!=null){if(n!=null){r=o.join(n,r)}if(u!=null){r=o.relative(u,r)}this.setSourceContent(r,t)}},this)};SourceMapGenerator.prototype._validateMapping=function SourceMapGenerator_validateMapping(e,r,n,t){if(r&&typeof r.line!=="number"&&typeof r.column!=="number"){throw new Error("original.line and original.column are not numbers -- you probably meant to omit "+"the original mapping entirely and only map the generated position. If so, pass "+"null for the original mapping instead of an object with empty or null values.")}if(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!t){return}else if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:t}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var e=0;var r=1;var n=0;var i=0;var u=0;var s=0;var a="";var l;var c;var f;var p;var g=this._mappings.toArray();for(var h=0,d=g.length;h0){if(!o.compareByGeneratedPositionsInflated(c,g[h-1])){continue}l+=","}}l+=t.encode(c.generatedColumn-e);e=c.generatedColumn;if(c.source!=null){p=this._sources.indexOf(c.source);l+=t.encode(p-s);s=p;l+=t.encode(c.originalLine-1-i);i=c.originalLine-1;l+=t.encode(c.originalColumn-n);n=c.originalColumn;if(c.name!=null){f=this._names.indexOf(c.name);l+=t.encode(f-u);u=f}}a+=l}return a};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(e,r){return e.map(function(e){if(!this._sourcesContents){return null}if(r!=null){e=o.relative(r,e)}var n=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){e.file=this._file}if(this._sourceRoot!=null){e.sourceRoot=this._sourceRoot}if(this._sourcesContents){e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)}return e};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this.toJSON())};r.h=SourceMapGenerator},990:(e,r,n)=>{var t;var o=n(341).h;var i=n(983);var u=/(\r?\n)/;var s=10;var a="$$$isSourceNode$$$";function SourceNode(e,r,n,t,o){this.children=[];this.sourceContents={};this.line=e==null?null:e;this.column=r==null?null:r;this.source=n==null?null:n;this.name=o==null?null:o;this[a]=true;if(t!=null)this.add(t)}SourceNode.fromStringWithSourceMap=function SourceNode_fromStringWithSourceMap(e,r,n){var t=new SourceNode;var o=e.split(u);var s=0;var a=function(){var e=getNextLine();var r=getNextLine()||"";return e+r;function getNextLine(){return s=0;r--){this.prepend(e[r])}}else if(e[a]||typeof e==="string"){this.children.unshift(e)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e)}return this};SourceNode.prototype.walk=function SourceNode_walk(e){var r;for(var n=0,t=this.children.length;n0){r=[];for(n=0;n{function getArg(e,r,n){if(r in e){return e[r]}else if(arguments.length===3){return n}else{throw new Error('"'+r+'" is a required argument.')}}r.getArg=getArg;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;var t=/^data:.+\,.+$/;function urlParse(e){var r=e.match(n);if(!r){return null}return{scheme:r[1],auth:r[2],host:r[3],port:r[4],path:r[5]}}r.urlParse=urlParse;function urlGenerate(e){var r="";if(e.scheme){r+=e.scheme+":"}r+="//";if(e.auth){r+=e.auth+"@"}if(e.host){r+=e.host}if(e.port){r+=":"+e.port}if(e.path){r+=e.path}return r}r.urlGenerate=urlGenerate;function normalize(e){var n=e;var t=urlParse(e);if(t){if(!t.path){return e}n=t.path}var o=r.isAbsolute(n);var i=n.split(/\/+/);for(var u,s=0,a=i.length-1;a>=0;a--){u=i[a];if(u==="."){i.splice(a,1)}else if(u===".."){s++}else if(s>0){if(u===""){i.splice(a+1,s);s=0}else{i.splice(a,2);s--}}}n=i.join("/");if(n===""){n=o?"/":"."}if(t){t.path=n;return urlGenerate(t)}return n}r.normalize=normalize;function join(e,r){if(e===""){e="."}if(r===""){r="."}var n=urlParse(r);var o=urlParse(e);if(o){e=o.path||"/"}if(n&&!n.scheme){if(o){n.scheme=o.scheme}return urlGenerate(n)}if(n||r.match(t)){return r}if(o&&!o.host&&!o.path){o.host=r;return urlGenerate(o)}var i=r.charAt(0)==="/"?r:normalize(e.replace(/\/+$/,"")+"/"+r);if(o){o.path=i;return urlGenerate(o)}return i}r.join=join;r.isAbsolute=function(e){return e.charAt(0)==="/"||n.test(e)};function relative(e,r){if(e===""){e="."}e=e.replace(/\/$/,"");var n=0;while(r.indexOf(e+"/")!==0){var t=e.lastIndexOf("/");if(t<0){return r}e=e.slice(0,t);if(e.match(/^([^\/]+:\/)?\/*$/)){return r}++n}return Array(n+1).join("../")+r.substr(e.length+1)}r.relative=relative;var o=function(){var e=Object.create(null);return!("__proto__"in e)}();function identity(e){return e}function toSetString(e){if(isProtoString(e)){return"$"+e}return e}r.toSetString=o?identity:toSetString;function fromSetString(e){if(isProtoString(e)){return e.slice(1)}return e}r.fromSetString=o?identity:fromSetString;function isProtoString(e){if(!e){return false}var r=e.length;if(r<9){return false}if(e.charCodeAt(r-1)!==95||e.charCodeAt(r-2)!==95||e.charCodeAt(r-3)!==111||e.charCodeAt(r-4)!==116||e.charCodeAt(r-5)!==111||e.charCodeAt(r-6)!==114||e.charCodeAt(r-7)!==112||e.charCodeAt(r-8)!==95||e.charCodeAt(r-9)!==95){return false}for(var n=r-10;n>=0;n--){if(e.charCodeAt(n)!==36){return false}}return true}function compareByOriginalPositions(e,r,n){var t=strcmp(e.source,r.source);if(t!==0){return t}t=e.originalLine-r.originalLine;if(t!==0){return t}t=e.originalColumn-r.originalColumn;if(t!==0||n){return t}t=e.generatedColumn-r.generatedColumn;if(t!==0){return t}t=e.generatedLine-r.generatedLine;if(t!==0){return t}return strcmp(e.name,r.name)}r.compareByOriginalPositions=compareByOriginalPositions;function compareByGeneratedPositionsDeflated(e,r,n){var t=e.generatedLine-r.generatedLine;if(t!==0){return t}t=e.generatedColumn-r.generatedColumn;if(t!==0||n){return t}t=strcmp(e.source,r.source);if(t!==0){return t}t=e.originalLine-r.originalLine;if(t!==0){return t}t=e.originalColumn-r.originalColumn;if(t!==0){return t}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsDeflated=compareByGeneratedPositionsDeflated;function strcmp(e,r){if(e===r){return 0}if(e===null){return 1}if(r===null){return-1}if(e>r){return 1}return-1}function compareByGeneratedPositionsInflated(e,r){var n=e.generatedLine-r.generatedLine;if(n!==0){return n}n=e.generatedColumn-r.generatedColumn;if(n!==0){return n}n=strcmp(e.source,r.source);if(n!==0){return n}n=e.originalLine-r.originalLine;if(n!==0){return n}n=e.originalColumn-r.originalColumn;if(n!==0){return n}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsInflated=compareByGeneratedPositionsInflated;function parseSourceMapInput(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}r.parseSourceMapInput=parseSourceMapInput;function computeSourceURL(e,r,n){r=r||"";if(e){if(e[e.length-1]!=="/"&&r[0]!=="/"){e+="/"}r=e+r}if(n){var t=urlParse(n);if(!t){throw new Error("sourceMapURL could not be parsed")}if(t.path){var o=t.path.lastIndexOf("/");if(o>=0){t.path=t.path.substring(0,o+1)}}r=join(urlGenerate(t),r)}return normalize(r)}r.computeSourceURL=computeSourceURL},596:(e,r,n)=>{n(341).h;r.SourceMapConsumer=n(327).SourceMapConsumer;n(990)},747:e=>{"use strict";e.exports=require("fs")},282:e=>{"use strict";e.exports=require("module")},622:e=>{"use strict";e.exports=require("path")}};var r={};function __webpack_require__(n){if(r[n]){return r[n].exports}var t=r[n]={exports:{}};var o=true;try{e[n](t,t.exports,__webpack_require__);o=false}finally{if(o)delete r[n]}return t.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(645)})(); --------------------------------------------------------------------------------