├── .gitignore ├── generator ├── README.md ├── tsconfig.json ├── res │ ├── tsconfig.json │ ├── webpack.config.js │ ├── package.json │ └── pre_generated.d.ts ├── src │ ├── object.ts │ ├── common.ts │ ├── payload.ts │ ├── config.ts │ ├── types.ts │ ├── enum.ts │ ├── event.ts │ └── main.ts ├── package.json └── .gitignore ├── dist ├── lib │ └── monaco-editor │ │ ├── min │ │ └── vs │ │ │ ├── base │ │ │ └── browser │ │ │ │ └── ui │ │ │ │ └── codiconLabel │ │ │ │ └── codicon │ │ │ │ └── codicon.ttf │ │ │ └── basic-languages │ │ │ ├── azcli │ │ │ └── azcli.js │ │ │ ├── ini │ │ │ └── ini.js │ │ │ ├── csp │ │ │ └── csp.js │ │ │ ├── xml │ │ │ └── xml.js │ │ │ ├── scheme │ │ │ └── scheme.js │ │ │ ├── sb │ │ │ └── sb.js │ │ │ ├── bat │ │ │ └── bat.js │ │ │ ├── dockerfile │ │ │ └── dockerfile.js │ │ │ ├── pascaligo │ │ │ └── pascaligo.js │ │ │ ├── cameligo │ │ │ └── cameligo.js │ │ │ ├── lua │ │ │ └── lua.js │ │ │ ├── graphql │ │ │ └── graphql.js │ │ │ ├── objective-c │ │ │ └── objective-c.js │ │ │ ├── mips │ │ │ └── mips.js │ │ │ ├── go │ │ │ └── go.js │ │ │ ├── sophia │ │ │ └── sophia.js │ │ │ ├── r │ │ │ └── r.js │ │ │ ├── shell │ │ │ └── shell.js │ │ │ ├── java │ │ │ └── java.js │ │ │ ├── fsharp │ │ │ └── fsharp.js │ │ │ ├── pascal │ │ │ └── pascal.js │ │ │ ├── python │ │ │ └── python.js │ │ │ ├── powershell │ │ │ └── powershell.js │ │ │ ├── kotlin │ │ │ └── kotlin.js │ │ │ ├── yaml │ │ │ └── yaml.js │ │ │ ├── redis │ │ │ └── redis.js │ │ │ ├── tcl │ │ │ └── tcl.js │ │ │ ├── coffee │ │ │ └── coffee.js │ │ │ ├── markdown │ │ │ └── markdown.js │ │ │ ├── less │ │ │ └── less.js │ │ │ ├── rust │ │ │ └── rust.js │ │ │ ├── apex │ │ │ └── apex.js │ │ │ ├── restructuredtext │ │ │ └── restructuredtext.js │ │ │ ├── swift │ │ │ └── swift.js │ │ │ ├── css │ │ │ └── css.js │ │ │ ├── csharp │ │ │ └── csharp.js │ │ │ ├── html │ │ │ └── html.js │ │ │ ├── pug │ │ │ └── pug.js │ │ │ ├── msdax │ │ │ └── msdax.js │ │ │ ├── typescript │ │ │ └── typescript.js │ │ │ ├── cpp │ │ │ └── cpp.js │ │ │ ├── abap │ │ │ └── abap.js │ │ │ ├── vb │ │ │ └── vb.js │ │ │ ├── twig │ │ │ └── twig.js │ │ │ ├── javascript │ │ │ └── javascript.js │ │ │ ├── handlebars │ │ │ └── handlebars.js │ │ │ └── scss │ │ │ └── scss.js │ │ └── LICENSE ├── manifest.json ├── editor │ ├── editor.html │ └── editor.js └── content │ └── content.js └── extension ├── .prettierrc ├── src ├── manifest.json └── editor │ └── editor.html ├── .eslintrc.json ├── package.json ├── gulpfile.js └── .gitignore /.gitignore: -------------------------------------------------------------------------------- 1 | package-lock.json 2 | /generator/generator -------------------------------------------------------------------------------- /generator/README.md: -------------------------------------------------------------------------------- 1 | # BFPortalUnleashedJS 2 | A code generator for the BFPortalUnleashed lib 3 | 4 | `config.json` is extracted from the `getBlueprintsById` GRPC response -------------------------------------------------------------------------------- /dist/lib/monaco-editor/min/vs/base/browser/ui/codiconLabel/codicon/codicon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ludonope/BFPortalUnleashed/HEAD/dist/lib/monaco-editor/min/vs/base/browser/ui/codiconLabel/codicon/codicon.ttf -------------------------------------------------------------------------------- /generator/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "commonjs", 5 | "rootDir": "src", 6 | "outDir": "intermediate" 7 | }, 8 | "include": [ 9 | "src", 10 | ] 11 | } -------------------------------------------------------------------------------- /generator/res/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "./dist/", 4 | "module": "es6", 5 | "target": "es6", 6 | "allowJs": true, 7 | "moduleResolution": "node", 8 | "lib": ["es2015", "dom"], 9 | }, 10 | "include": [ 11 | "src", 12 | ] 13 | } -------------------------------------------------------------------------------- /extension/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 100, 3 | "tabWidth": 4, 4 | "useTabs": false, 5 | "semi": true, 6 | "singleQuote": true, 7 | "trailingComma": "none", 8 | "bracketSpacing": true, 9 | "jsxBracketSameLine": false, 10 | "arrowParens": "avoid" 11 | } 12 | -------------------------------------------------------------------------------- /dist/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "portal-unleashed", 3 | "name": "Portal Unleashed", 4 | "version": "1.1.2", 5 | "description": "A Battlefield Portal scripting tool", 6 | "author": "Ludonope", 7 | "homepage": "https://github.com/Ludonope/BFPortalUnleashed", 8 | "main": "content/content.js" 9 | } -------------------------------------------------------------------------------- /extension/src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "portal-unleashed", 3 | "name": "Portal Unleashed", 4 | "version": "1.1.2", 5 | "description": "A Battlefield Portal scripting tool", 6 | "author": "Ludonope", 7 | "homepage": "https://github.com/Ludonope/BFPortalUnleashed", 8 | "main": "content/content.js" 9 | } -------------------------------------------------------------------------------- /generator/src/object.ts: -------------------------------------------------------------------------------- 1 | import { Named } from './common' 2 | import { Type } from './types' 3 | 4 | export class BObject extends Named { 5 | type: Type 6 | deprecated: boolean 7 | 8 | constructor(json: any) { 9 | super(json) 10 | this.type = new Type(json.type) 11 | this.deprecated = json.deprecated 12 | } 13 | } -------------------------------------------------------------------------------- /dist/editor/editor.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /extension/src/editor/editor.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /generator/src/common.ts: -------------------------------------------------------------------------------- 1 | export class Named { 2 | name: string 3 | SID: string 4 | 5 | constructor(json: any) { 6 | this.name = json.name 7 | this.SID = json.displayNameSID 8 | } 9 | } 10 | 11 | export function sanitize(s: string): string { 12 | return s.replace("-", "_").replace(" ", "_") 13 | } 14 | 15 | export function category(s: string): string { 16 | if (s == 'UI') return 'ui' 17 | s = s[0].toLowerCase() + s.substring(1) 18 | return s.replace("-", "").replace(" ", "") 19 | } -------------------------------------------------------------------------------- /generator/src/payload.ts: -------------------------------------------------------------------------------- 1 | import { Named } from './common' 2 | import { Type } from './types' 3 | 4 | export class BPayload extends Named { 5 | type: Type 6 | parameter: string 7 | deprecated: boolean 8 | 9 | constructor(json: any) { 10 | super(json) 11 | this.type = new Type(json.functionSignatures[0].returnType) 12 | this.parameter = json.eventParameter 13 | this.deprecated = json.deprecated 14 | } 15 | 16 | pretty(): string { 17 | return this.parameter[0].toLowerCase() + this.parameter.substring(1) 18 | } 19 | } -------------------------------------------------------------------------------- /extension/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es6": true, 5 | "webextensions": true, 6 | "jasmine": true 7 | }, 8 | "extends": "eslint:recommended", 9 | "parserOptions": { 10 | "sourceType": "module" 11 | }, 12 | "rules": { 13 | "quotes": [ 14 | "error", 15 | "double" 16 | ], 17 | "semi": [ 18 | "error", 19 | "always" 20 | ] 21 | }, 22 | "globals": { 23 | "require": true, 24 | "monaco": true, 25 | "editor": true, 26 | "editable": true 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /generator/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "portal-unleashed-generator", 3 | "version": "1.0.0", 4 | "description": "A JavaScript lib for Battlefield Portal Unleashed", 5 | "main": "dist/unleash.js", 6 | "repository": "git@github.com:Ludonope/BFPortalUnleashedJS.git", 7 | "author": "Ludonope ", 8 | "license": "MIT", 9 | "devDependencies": { 10 | "@types/node": "^16.11.7", 11 | "babel-cli": "^6.26.0", 12 | "babel-preset-es2015": "^6.24.1", 13 | "shx": "^0.3.3", 14 | "ts-morph": "^12.2.0", 15 | "typescript": "4.5.2" 16 | }, 17 | "scripts": { 18 | "generate": "tsc && node intermediate/main.js && shx cp res/package.json res/tsconfig.json res/webpack.config.js portal-unleashed", 19 | "build": "npm run generate && cd portal-unleashed && npm install && npm run build", 20 | "test": "npm run build && node test/test.js", 21 | "clean": "shx rm -r intermediate portal-unleashed" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /generator/res/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const webpack = require('webpack') 3 | 4 | module.exports = { 5 | entry: './src/unleash.ts', 6 | module: { 7 | rules: [{ 8 | test: /\.tsx?$/, 9 | use: 'ts-loader', 10 | exclude: /node_modules/, 11 | }] 12 | }, 13 | resolve: { 14 | extensions: ['.tsx', '.ts', '.js'], 15 | fallback: { 16 | // "path": false, 17 | // "fs": false, 18 | } 19 | }, 20 | output: { 21 | filename: 'unleash.js', 22 | path: path.resolve(__dirname, 'dist'), 23 | libraryTarget: 'module', 24 | }, 25 | mode: 'production', 26 | experiments: { 27 | outputModule: true, 28 | }, 29 | plugins: [ 30 | new webpack.ProvidePlugin({ 31 | Buffer: ['buffer', 'Buffer'], 32 | }), 33 | new webpack.ProvidePlugin({ 34 | process: 'process/browser', 35 | }), 36 | new webpack.ProvidePlugin({ 37 | path: false 38 | }) 39 | ] 40 | }; -------------------------------------------------------------------------------- /dist/lib/monaco-editor/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 - present Microsoft Corporation 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 all 13 | 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 THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /generator/res/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "portal-unleashed", 3 | "version": "1.0.0", 4 | "description": "A JavaScript lib for Battlefield Portal Unleashed", 5 | "main": "dist/unleash.js", 6 | "repository": "git@github.com:Ludonope/BFPortalUnleashedJS.git", 7 | "author": "Ludonope ", 8 | "license": "MIT", 9 | "dependencies": { 10 | "@babel/core": "^7.16.0", 11 | "@babel/generator": "^7.16.0", 12 | "@babel/parser": "^7.16.3", 13 | "@babel/runtime": "^7.16.3", 14 | "@babel/traverse": "^7.16.3", 15 | "@babel/types": "^7.16.0", 16 | "assert": "^2.0.0", 17 | "babel-prettier-parser": "^0.10.5", 18 | "prettier": "^2.4.1", 19 | "xmlbuilder2": "^3.0.2" 20 | }, 21 | "scripts": { 22 | "build": "webpack && shx cp src/unleash.d.ts dist", 23 | "clean": "shx rm -r dist" 24 | }, 25 | "devDependencies": { 26 | "@babel/plugin-transform-runtime": "^7.16.4", 27 | "buffer": "^6.0.3", 28 | "process": "^0.11.10", 29 | "shx": "^0.3.3", 30 | "ts-loader": "^9.2.6", 31 | "typescript": "^4.4.4", 32 | "webpack": "^5.64.0", 33 | "webpack-cli": "^4.9.1" 34 | } 35 | } -------------------------------------------------------------------------------- /dist/lib/monaco-editor/min/vs/basic-languages/azcli/azcli.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * monaco-languages version: 1.10.0(1b4729c63bdb0d1e06d4e637e5c3977ddeb714dd) 4 | * Released under the MIT license 5 | * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md 6 | *-----------------------------------------------------------------------------*/ 7 | define("vs/basic-languages/azcli/azcli",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{lineComment:"#"}},t.language={defaultToken:"keyword",ignoreCase:!0,tokenPostfix:".azcli",str:/[^#\s]/,tokenizer:{root:[{include:"@comment"},[/\s-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}],[/^-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}]],type:[{include:"@comment"},[/-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":"key.identifier"}}],[/@str+\s*/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}]],comment:[[/#.*$/,{cases:{"@eos":{token:"comment",next:"@popall"}}}]]}}})); -------------------------------------------------------------------------------- /extension/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bfportal-unleashed-extension", 3 | "version": "0.0.1", 4 | "description": "A Battlefield Portal scripting tool", 5 | "repository": { 6 | "type": "git", 7 | "url": "https://github.com/Ludonope/BFPortalUnleashed" 8 | }, 9 | "author": { 10 | "name": "Ludonope", 11 | "email": "ludonope@nopestudio.fr", 12 | "url": "https://github.com/Ludonope" 13 | }, 14 | "license": "Apache-2.0", 15 | "bugs": { 16 | "url": "https://github.com/Ludonope/BFPortalUnleashed/issues" 17 | }, 18 | "homepage": "https://github.com/Ludonope/BFPortalUnleashed#readme", 19 | "dependencies": { 20 | "monaco-editor": "~0.20.0", 21 | "portal-unleashed": "../generator/portal-unleashed/", 22 | "requirejs": "^2.3.6" 23 | }, 24 | "devDependencies": { 25 | "del": "^6.0.0", 26 | "gulp": "^4.0.2", 27 | "gulp-eslint": "^6.0.0", 28 | "gulp-minify": "^3.1.0", 29 | "gulp-open": "^3.0.1", 30 | "gulp-prettier": "^3.0.0", 31 | "gulp-zip": "^5.0.2", 32 | "jasmine": "^3.6.1", 33 | "live-server": "1.2.1", 34 | "sinon-chrome": "^3.0.1" 35 | }, 36 | "scripts": { 37 | "build": "gulp build", 38 | "watch": "gulp watch", 39 | "start": "live-server --cors build" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /dist/lib/monaco-editor/min/vs/basic-languages/ini/ini.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * monaco-languages version: 1.10.0(1b4729c63bdb0d1e06d4e637e5c3977ddeb714dd) 4 | * Released under the MIT license 5 | * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md 6 | *-----------------------------------------------------------------------------*/ 7 | define("vs/basic-languages/ini/ini",["require","exports"],(function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},n.language={defaultToken:"",tokenPostfix:".ini",escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^\[[^\]]*\]/,"metatag"],[/(^\w+)(\s*)(\=)/,["key","","delimiter"]],{include:"@whitespace"},[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],whitespace:[[/[ \t\r\n]+/,""],[/^\s*[#;].*$/,"comment"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}}})); -------------------------------------------------------------------------------- /extension/gulpfile.js: -------------------------------------------------------------------------------- 1 | const del = require("del"); 2 | const gulp = require("gulp"); 3 | const minify = require("gulp-minify"); 4 | 5 | const included_modules = [ 6 | "node_modules/monaco-editor/min/**/*", 7 | "node_modules/monaco-editor/LICENSE", 8 | "node_modules/requirejs/require.js", 9 | "node_modules/portal-unleashed/dist/unleash.js", 10 | "node_modules/portal-unleashed/dist/unleash.d.ts" 11 | ]; 12 | 13 | gulp.task("clean-build", function() { 14 | return del(["build/**/*"]); 15 | }); 16 | 17 | gulp.task("copy-sources", function() { 18 | return gulp 19 | .src("src/**/*") 20 | .pipe(gulp.dest("build")); 21 | }); 22 | 23 | gulp.task("minify-sources", function() { 24 | return gulp 25 | .src("src/**/*") 26 | .pipe( 27 | minify({ 28 | noSource: true, 29 | ext: { 30 | min: ".js" 31 | } 32 | }) 33 | ) 34 | .pipe(gulp.dest("build")); 35 | }); 36 | 37 | gulp.task("include-minified-modules", function() { 38 | return gulp 39 | .src(included_modules, { 40 | base: "node_modules" 41 | }) 42 | .pipe( 43 | minify({ 44 | noSource: true, 45 | ext: { 46 | min: ".js" 47 | }, 48 | exclude: ["monaco-editor"], // Already minified. 49 | preserveComments: "some" // Preserve licensing information in require.js. 50 | }) 51 | ) 52 | .pipe(gulp.dest("build/lib")); 53 | }); 54 | 55 | gulp.task("build", gulp.series("clean-build", "minify-sources", "include-minified-modules")); 56 | gulp.task("watch", function () { 57 | gulp.watch("src/**/*", gulp.series(["copy-sources"])); 58 | }); -------------------------------------------------------------------------------- /dist/lib/monaco-editor/min/vs/basic-languages/csp/csp.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * monaco-languages version: 1.10.0(1b4729c63bdb0d1e06d4e637e5c3977ddeb714dd) 4 | * Released under the MIT license 5 | * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md 6 | *-----------------------------------------------------------------------------*/ 7 | define("vs/basic-languages/csp/csp",["require","exports"],(function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.conf={brackets:[],autoClosingPairs:[],surroundingPairs:[]},e.language={keywords:[],typeKeywords:[],tokenPostfix:".csp",operators:[],symbols:/[=>"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}]},t.language={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[//,"comment","@pop"],[//,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}}})); -------------------------------------------------------------------------------- /dist/content/content.js: -------------------------------------------------------------------------------- 1 | const PortalUnleashed=function(){const e="portal-unleashed",t="splitscreen-right",n=.5,o="vs-dark",l='import { mod, gameplay, player, ui } from "portal-unleashed"\n\n// Always call mod.init before anything else\nmod.init()\n\nmod.onPlayerJoinGame("Welcome new player", (eventPlayer) => ({\n conditions: [],\n actions: () => {\n ui.ShowEventGameModeMessage(ui.Message("Welcome", eventPlayer))\n }\n}))';let i,s,r=void 0,a=void 0,d=6,c=void 0,p="empty",m=!1;function u(){let i=window.location.toString();if(-1!=i.indexOf("playgroundId=")){let e=i.split("?")[1].split("&").map(e=>e.split("="));p=e.find(e=>"playgroundId"==e[0])[1]}b("playgroundId",p);const u=g();var v,k;v=u.theme&&u||o,k=u.code&&u.code[p]||l,window.addEventListener("message",function(t){const n=t.data;var o,l;if(n.plugin===e)if("init"===n.type){const t={theme:v,code:k,filename:"main.ts"};o="init",l=t,a.contentWindow.postMessage({plugin:e,type:o,payload:l},"*")}else if("update-theme"===n.type)f(function(e){e.theme=n.payload});else if("update-mode"===n.type)h(n.payload);else if("execute"===n.type){const e=n.payload;f(function(t){t.code=t.code||{},t.code[p]=e});let t=`import * as __portal from "${c.getUrl("lib/portal-unleashed/dist/unleash.js")}"\n`+e.replaceAll("portal-unleashed",c.getUrl("lib/portal-unleashed/dist/unleash.js"));var i=document.createElement("script");i.type="module",i.innerHTML=`\n import prettier from "https://unpkg.com/prettier@2.4.1/esm/standalone.mjs";\n import parserBabel from "https://unpkg.com/prettier@2.4.1/esm/parser-babel.mjs";\n import * as __portal from "${c.getUrl("lib/portal-unleashed/dist/unleash.js")}"\n \n const code = prettier.format(__portal.preprocess(${JSON.stringify(t)}, ${m}), {\n parser: "babel",\n plugins: [parserBabel],\n })\n PortalUnleashed.debugMessage("generated code:", code)\n var s = document.createElement("script");\n s.type = "module"\n s.innerHTML = \`\${code}\n \n setTimeout(function() {\n _Blockly.Xml.clearWorkspaceAndLoadFromXml(_Blockly.Xml.textToDom(mod.toXML()), _Blockly.mainWorkspace)\n }, 0);\`\n s.onload = function() {\n this.remove()\n };\n (document.head || document.documentElement).appendChild(s);\n `,i.onload=function(){this.remove()},(document.head||document.documentElement).appendChild(i)}}),s=u.ratio||n,function(){r.style.gridTemplateRows="1fr",r.children[0].style.gridArea="blocks";let e=!1;const t=document.createElement("div");t.id="resize-bar",t.setAttribute("style",`width: ${d}px; height: 100%; cursor: col-resize; grid-area: bar;`),t.onmousedown=function(){e=!0;const t=document.createElement("div");t.innerHTML=" ",t.id="editor-resize-overlay",t.setAttribute("style","z-index: 1; width: 100%; height: 100%; grid-area: editor"),r.appendChild(t)},r.appendChild(t),(a=document.createElement("iframe")).id="unleashed-editor",a.setAttribute("src",c.getUrl("editor/editor.html")),a.setAttribute("style","z-index: 0; border: 0px none; width: 100%; height: 100%; grid-area: editor;"),r.appendChild(a),r.onmouseup=a.onmouseup=function(){e=!1;const t=document.getElementById("editor-resize-overlay");t&&r.removeChild(t)},r.onmousemove=a.onmousemove=function(t){if(e){n=1-t.clientX/r.clientWidth,f(function(e){e.ratio=n});let e=[t.clientX-d,d,r.clientWidth-t.clientX-d],o=e.map(e=>e.toString()+"px").join(" ");r.style.gridTemplateColumns=o,t.preventDefault()}var n}}(),y(u.mode||t)}function y(e){i=e;const t=document.getElementById("resize-bar"),n=document.getElementById("unleashed-editor");if("fullscreen"===e)r.style.gridTemplateColumns="0 0 1fr",r.style.gridTemplateAreas="'blocks bar editor'",t.style.display="none",n.style.display="block";else if("splitscreen-left"===e){const e=r.clientWidth-d;let o=[e*(1-s),d,e*s].map(e=>e.toString()+"px").join(" ");r.style.gridTemplateColumns=o,r.style.gridTemplateAreas="'editor bar blocks'",t.style.display="block",n.style.display="block"}else if("splitscreen-right"===e){const e=r.clientWidth-d;let o=[e*(1-s),d,e*s].map(e=>e.toString()+"px").join(" ");r.style.gridTemplateColumns=o,r.style.gridTemplateAreas="'blocks bar editor'",t.style.display="block",n.style.display="block"}else r.style.gridTemplateColumns="1fr",r.style.gridTemplateAreas="'blocks'",t.style.display="none",n.style.display="none"}function g(){const t=localStorage.getItem(e);return t?JSON.parse(t):{}}function h(e){f(function(t){t.mode=e}),y(e)}function f(t){const n=g();t(n),localStorage.setItem(e,JSON.stringify(n))}function b(...e){m&&console.log.apply(this,e)}const v=function(){return{id:"toggleEditorBlockly",displayText:"Show Code Editor",scopeType:_Blockly.ContextMenuRegistry.ScopeType.WORKSPACE,weight:99,preconditionFn:function(){return"disable"===i?"enabled":"hidden"},callback:function(){h("splitscreen-right")}}}();return function(){(c=BF2042Portal.Plugins.getPlugin(e))||BF2042Portal.Shared.logError("Failed to load Portal Unleashed!"),_Blockly.ContextMenuRegistry.registry.register(v);const t=setInterval(()=>{r=document.getElementsByClassName("app")[0];const e=document.getElementsByClassName("rules");r&&e.length>0&&(clearInterval(t),u())},100)}(),{debugMessage:b,toggleDebug:function(){m=!m}}}(); -------------------------------------------------------------------------------- /dist/lib/monaco-editor/min/vs/basic-languages/pug/pug.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * monaco-languages version: 1.10.0(1b4729c63bdb0d1e06d4e637e5c3977ddeb714dd) 4 | * Released under the MIT license 5 | * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md 6 | *-----------------------------------------------------------------------------*/ 7 | define("vs/basic-languages/pug/pug",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={comments:{lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}],folding:{offSide:!0}},t.language={defaultToken:"",tokenPostfix:".pug",ignoreCase:!0,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["append","block","case","default","doctype","each","else","extends","for","if","in","include","mixin","typeof","unless","var","when"],tags:["a","abbr","acronym","address","area","article","aside","audio","b","base","basefont","bdi","bdo","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","keygen","kbd","label","li","link","map","mark","menu","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","tracks","tt","u","ul","video","wbr"],symbols:/[\+\-\*\%\&\|\!\=\/\.\,\:]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^(\s*)([a-zA-Z_-][\w-]*)/,{cases:{"$2@tags":{cases:{"@eos":["","tag"],"@default":["",{token:"tag",next:"@tag.$1"}]}},"$2@keywords":["",{token:"keyword.$2"}],"@default":["",""]}}],[/^(\s*)(#[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.id"],"@default":["",{token:"tag.id",next:"@tag.$1"}]}}],[/^(\s*)(\.[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.class"],"@default":["",{token:"tag.class",next:"@tag.$1"}]}}],[/^(\s*)(\|.*)$/,""],{include:"@whitespace"},[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":""}}],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d+/,"number"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],tag:[[/(\.)(\s*$)/,[{token:"delimiter",next:"@blockText.$S2."},""]],[/\s+/,{token:"",next:"@simpleText"}],[/#[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.id",next:"@pop"},"@default":"tag.id"}}],[/\.[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.class",next:"@pop"},"@default":"tag.class"}}],[/\(/,{token:"delimiter.parenthesis",next:"@attributeList"}]],simpleText:[[/[^#]+$/,{token:"",next:"@popall"}],[/[^#]+/,{token:""}],[/(#{)([^}]*)(})/,{cases:{"@eos":["interpolation.delimiter","interpolation",{token:"interpolation.delimiter",next:"@popall"}],"@default":["interpolation.delimiter","interpolation","interpolation.delimiter"]}}],[/#$/,{token:"",next:"@popall"}],[/#/,""]],attributeList:[[/\s+/,""],[/(\w+)(\s*=\s*)("|')/,["attribute.name","delimiter",{token:"attribute.value",next:"@value.$3"}]],[/\w+/,"attribute.name"],[/,/,{cases:{"@eos":{token:"attribute.delimiter",next:"@popall"},"@default":"attribute.delimiter"}}],[/\)$/,{token:"delimiter.parenthesis",next:"@popall"}],[/\)/,{token:"delimiter.parenthesis",next:"@pop"}]],whitespace:[[/^(\s*)(\/\/.*)$/,{token:"comment",next:"@blockText.$1.comment"}],[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[//,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name.html","@scriptAfterType"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter.html","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value.html",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value.html",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name.html","@styleAfterType"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter.html","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value.html",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value.html",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}}})); -------------------------------------------------------------------------------- /dist/lib/monaco-editor/min/vs/basic-languages/javascript/javascript.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * monaco-languages version: 1.10.0(1b4729c63bdb0d1e06d4e637e5c3977ddeb714dd) 4 | * Released under the MIT license 5 | * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md 6 | *-----------------------------------------------------------------------------*/ 7 | define("vs/basic-languages/typescript/typescript",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"==typeof monaco?self.monaco:monaco;t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:n.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:n.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:n.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:n.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},t.language={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","as","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","package","private","protected","public","readonly","require","global","return","set","static","super","switch","symbol","this","throw","true","try","type","typeof","unique","var","void","while","with","yield","async","await","of"],typeKeywords:["any","boolean","number","object","string","undefined"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([gimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}}})),define("vs/basic-languages/javascript/javascript",["require","exports","../typescript/typescript"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});"undefined"==typeof monaco?self.monaco:monaco;t.conf=n.conf,t.language={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:n.language.operators,symbols:n.language.symbols,escapes:n.language.escapes,digits:n.language.digits,octaldigits:n.language.octaldigits,binarydigits:n.language.binarydigits,hexdigits:n.language.hexdigits,regexpctl:n.language.regexpctl,regexpesc:n.language.regexpesc,tokenizer:n.language.tokenizer}})); -------------------------------------------------------------------------------- /dist/lib/monaco-editor/min/vs/basic-languages/handlebars/handlebars.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * monaco-languages version: 1.10.0(1b4729c63bdb0d1e06d4e637e5c3977ddeb714dd) 4 | * Released under the MIT license 5 | * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md 6 | *-----------------------------------------------------------------------------*/ 7 | define("vs/basic-languages/handlebars/handlebars",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"==typeof monaco?self.monaco:monaco,a=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];t.conf={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[["\x3c!--","--\x3e"],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("<(?!(?:"+a.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:n.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(?!(?:"+a.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:n.languages.IndentAction.Indent}}]},t.language={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}}})); -------------------------------------------------------------------------------- /dist/lib/monaco-editor/min/vs/basic-languages/scss/scss.js: -------------------------------------------------------------------------------- 1 | /*!----------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * monaco-languages version: 1.10.0(1b4729c63bdb0d1e06d4e637e5c3977ddeb714dd) 4 | * Released under the MIT license 5 | * https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md 6 | *-----------------------------------------------------------------------------*/ 7 | define("vs/basic-languages/scss/scss",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.conf={wordPattern:/(#?-?\d*\.\d\w*%?)|([@$#!.:]?[\w-?]+%?)|[@#!.]/g,comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},t.language={defaultToken:"",tokenPostfix:".scss",ws:"[ \t\n\r\f]*",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@variabledeclaration"},{include:"@warndebug"},["[@](include)",{token:"keyword",next:"@includedeclaration"}],["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["[@](function)",{token:"keyword",next:"@functiondeclaration"}],["[@](mixin)",{token:"keyword",next:"@mixindeclaration"}],["url(\\-prefix)?\\(",{token:"meta",next:"@urldeclaration"}],{include:"@controlstatement"},{include:"@selectorname"},["[&\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.curly",next:"@selectorbody"}]],selectorbody:[["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],{include:"@selector"},["[@](extend)",{token:"keyword",next:"@extendbody"}],["[@](return)",{token:"keyword",next:"@declarationbody"}],["}",{token:"delimiter.curly",next:"@pop"}]],selectorname:[["#{",{token:"meta",next:"@variableinterpolation"}],["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["url(\\-prefix)?\\(",{token:"meta",next:"@urldeclaration"}],{include:"@functioninvocation"},{include:"@numbers"},{include:"@strings"},{include:"@variablereference"},["(and\\b|or\\b|not\\b)","operator"],{include:"@name"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","operator"],[",","delimiter"],["!default","literal"],["\\(",{token:"delimiter.parenthesis",next:"@parenthizedterm"}]],rulevalue:[{include:"@term"},["!important","literal"],[";","delimiter","@pop"],["{",{token:"delimiter.curly",switchTo:"@nestedproperty"}],["(?=})",{token:"",next:"@pop"}]],nestedproperty:[["[*_]?@identifier@ws:","attribute.name","@rulevalue"],{include:"@comments"},["}",{token:"delimiter.curly",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],variabledeclaration:[["\\$@identifier@ws:","variable.decl","@declarationbody"]],urldeclaration:[{include:"@strings"},["[^)\r\n]+","string"],["\\)",{token:"meta",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],extendbody:[{include:"@selectorname"},["!optional","literal"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],variablereference:[["\\$@identifier","variable.ref"],["\\.\\.\\.","operator"],["#{",{token:"meta",next:"@variableinterpolation"}]],variableinterpolation:[{include:"@variablereference"},["}",{token:"meta",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],name:[["@identifier","attribute.value"]],numbers:[["(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","number.hex"]],units:[["(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","number","@pop"]],functiondeclaration:[["@identifier@ws\\(",{token:"meta",next:"@parameterdeclaration"}],["{",{token:"delimiter.curly",switchTo:"@functionbody"}]],mixindeclaration:[["@identifier@ws\\(",{token:"meta",next:"@parameterdeclaration"}],["@identifier","meta"],["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],parameterdeclaration:[["\\$@identifier@ws:","variable.decl"],["\\.\\.\\.","operator"],[",","delimiter"],{include:"@term"},["\\)",{token:"meta",next:"@pop"}]],includedeclaration:[{include:"@functioninvocation"},["@identifier","meta"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}],["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],keyframedeclaration:[["@identifier","meta"],["{",{token:"delimiter.curly",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.curly",next:"@selectorbody"}],["}",{token:"delimiter.curly",next:"@pop"}]],controlstatement:[["[@](if|else|for|while|each|media)",{token:"keyword.flow",next:"@controlstatementdeclaration"}]],controlstatementdeclaration:[["(in|from|through|if|to)\\b",{token:"keyword.flow"}],{include:"@term"},["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],functionbody:[["[@](return)",{token:"keyword"}],{include:"@variabledeclaration"},{include:"@term"},{include:"@controlstatement"},[";","delimiter"],["}",{token:"delimiter.curly",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"meta",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"meta",next:"@pop"}]],strings:[['~?"',{token:"string.delimiter",next:"@stringenddoublequote"}],["~?'",{token:"string.delimiter",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string.delimiter",next:"@pop"}],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string.delimiter",next:"@pop"}],[".","string"]]}}})); --------------------------------------------------------------------------------