Update libraries (#440)
This commit is contained in:
parent
b781c2b7b3
commit
c61d34d053
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,3 +1,7 @@
|
|||
.DS_Store
|
||||
pull_locales_login.rb
|
||||
.vscode
|
||||
node_modules/
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
*.zip
|
||||
|
|
|
@ -482,6 +482,7 @@ onDOMscriptReady('/codemirror.js').then(() => {
|
|||
if (!chrome.runtime.getPackageDirectoryEntry) {
|
||||
const themes = [
|
||||
chrome.i18n.getMessage('defaultTheme'),
|
||||
/* populate-theme-start */
|
||||
'3024-day',
|
||||
'3024-night',
|
||||
'abcdef',
|
||||
|
@ -493,17 +494,21 @@ onDOMscriptReady('/codemirror.js').then(() => {
|
|||
'blackboard',
|
||||
'cobalt',
|
||||
'colorforth',
|
||||
'darcula',
|
||||
'dracula',
|
||||
'duotone-dark',
|
||||
'duotone-light',
|
||||
'eclipse',
|
||||
'elegant',
|
||||
'erlang-dark',
|
||||
'gruvbox-dark',
|
||||
'hopscotch',
|
||||
'icecoder',
|
||||
'idea',
|
||||
'isotope',
|
||||
'lesser-dark',
|
||||
'liquibyte',
|
||||
'lucario',
|
||||
'material',
|
||||
'mbo',
|
||||
'mdn-like',
|
||||
|
@ -522,6 +527,7 @@ onDOMscriptReady('/codemirror.js').then(() => {
|
|||
'seti',
|
||||
'shadowfox',
|
||||
'solarized',
|
||||
'ssms',
|
||||
'the-matrix',
|
||||
'tomorrow-night-bright',
|
||||
'tomorrow-night-eighties',
|
||||
|
@ -532,6 +538,7 @@ onDOMscriptReady('/codemirror.js').then(() => {
|
|||
'xq-light',
|
||||
'yeti',
|
||||
'zenburn',
|
||||
/* populate-theme-end */
|
||||
];
|
||||
localStorage.codeMirrorThemes = themes.join(' ');
|
||||
return Promise.resolve(themes);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<script src="js/script-loader.js"></script>
|
||||
<script src="js/storage-util.js"></script>
|
||||
<script src="content/apply.js"></script>
|
||||
<script src="vendor/node-semver/semver.js"></script>
|
||||
<script src="vendor/semver-bundle/semver.js"></script>
|
||||
|
||||
<link href="msgbox/msgbox.css" rel="stylesheet">
|
||||
<script src="msgbox/msgbox.js"></script>
|
||||
|
|
|
@ -69,7 +69,7 @@ var [chromeLocal, chromeSync] = (() => {
|
|||
function loadLZStringScript() {
|
||||
return window.LZString ?
|
||||
Promise.resolve(window.LZString) :
|
||||
loadScript('/vendor/lz-string/lz-string-unsafe.js').then(() =>
|
||||
loadScript('/vendor/lz-string-unsafe/lz-string-unsafe.min.js').then(() =>
|
||||
(window.LZString = window.LZString || window.LZStringUnsafe));
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ var usercss = (() => {
|
|||
},
|
||||
stylus: {
|
||||
preprocess(source, vars) {
|
||||
return loadScript('/vendor/stylus-lang/stylus.min.js').then(() => (
|
||||
return loadScript('/vendor/stylus-lang-bundle/stylus.min.js').then(() => (
|
||||
new Promise((resolve, reject) => {
|
||||
const varDef = Object.keys(vars).map(key => `${key} = ${vars[key].value};\n`).join('');
|
||||
if (!Error.captureStackTrace) Error.captureStackTrace = () => {};
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
"background/update.js",
|
||||
"background/refresh-all-tabs.js",
|
||||
"background/openusercss-api.js",
|
||||
"vendor/node-semver/semver.js",
|
||||
"vendor/semver-bundle/semver.js",
|
||||
"vendor-overwrites/colorpicker/colorconverter.js"
|
||||
]
|
||||
},
|
||||
|
|
29
package.json
Normal file
29
package.json
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"name": "Stylus",
|
||||
"version": "1.4.16",
|
||||
"description": "Redesign the web with Stylus, a user styles manager",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "openstyles/stylus",
|
||||
"author": "Stylus Team",
|
||||
"devDependencies": {
|
||||
"archiver": "^2.1.1",
|
||||
"codemirror": "^5.39.2",
|
||||
"eslint": "^5.2.0",
|
||||
"fs-extra": "^7.0.0",
|
||||
"jsonlint": "^1.6.3",
|
||||
"less": "^3.7.1",
|
||||
"lz-string-unsafe": "^1.4.4-beta",
|
||||
"semver-bundle": "^0.1.0",
|
||||
"stylelint-bundle": "^8.0.0",
|
||||
"stylus-lang-bundle": "^0.54.5",
|
||||
"updates": "^4.0.1"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint **/*.js || true",
|
||||
"update": "npm run update-node && npm run update-versions && npm run update-codemirror",
|
||||
"update-codemirror": "node tools/update-libraries.js && node tools/update-codemirror-themes.js",
|
||||
"update-node": "updates -u && npm update",
|
||||
"update-versions": "node tools/update-versions",
|
||||
"zip": "npm run update-versions && node tools/zip.js"
|
||||
}
|
||||
}
|
9
tools/.eslintrc
Normal file
9
tools/.eslintrc
Normal file
|
@ -0,0 +1,9 @@
|
|||
# https://github.com/eslint/eslint/blob/master/docs/rules/README.md
|
||||
|
||||
parserOptions:
|
||||
ecmaVersion: 2017
|
||||
|
||||
env:
|
||||
browser: true
|
||||
es6: true
|
||||
node: true
|
44
tools/update-codemirror-themes.js
Normal file
44
tools/update-codemirror-themes.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
|
||||
// Update theme names list in codemirror-editing-hook.js
|
||||
async function getThemes() {
|
||||
const p = path.join(__dirname, '..', 'vendor/codemirror/theme/');
|
||||
const files = await fs.readdir(p);
|
||||
return files
|
||||
.filter(name => name.endsWith('.css'))
|
||||
.map(name => name.replace('.css', ''))
|
||||
.sort();
|
||||
}
|
||||
|
||||
function replaceThemes(content, themes) {
|
||||
const lineFeed = content.includes('\r\n') ? '\r\n' : '\n';
|
||||
return content.replace(
|
||||
/(\x20+)(\/\*\s*populate-theme-start\s*\*\/)[\s\S]+?(\/\*\s*populate-theme-end\s*\*\/)/,
|
||||
(_, indent, intro, outro) =>
|
||||
indent + intro + lineFeed +
|
||||
themes.map(_ => `${indent}'${_}',`).join(lineFeed) + lineFeed +
|
||||
indent + outro
|
||||
);
|
||||
}
|
||||
|
||||
async function updateHook(themes) {
|
||||
const fileName = path.join(__dirname, '..', 'edit/codemirror-editing-hooks.js');
|
||||
const content = await fs.readFile(fileName, 'utf-8');
|
||||
fs.writeFile(fileName, replaceThemes(content, themes));
|
||||
}
|
||||
|
||||
function exit(err) {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
}
|
||||
process.exit(err ? 1 : 0);
|
||||
}
|
||||
|
||||
getThemes()
|
||||
.then(themes => updateHook(themes))
|
||||
.then(() => console.log('\x1b[32m%s\x1b[0m', 'codemirror themes list updated'))
|
||||
.catch(exit);
|
113
tools/update-libraries.js
Normal file
113
tools/update-libraries.js
Normal file
|
@ -0,0 +1,113 @@
|
|||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
|
||||
const root = path.join(__dirname, '..');
|
||||
|
||||
const files = {
|
||||
'codemirror': [
|
||||
'*', // only update existing vendor files
|
||||
'theme' // update all theme files
|
||||
],
|
||||
'jsonlint': [
|
||||
'lib/jsonlint.js → jsonlint.js'
|
||||
],
|
||||
'less': [
|
||||
'dist/less.min.js → less.min.js'
|
||||
],
|
||||
'lz-string-unsafe': [
|
||||
'lz-string-unsafe.min.js'
|
||||
],
|
||||
'semver-bundle': [
|
||||
'dist/semver.js → semver.js'
|
||||
],
|
||||
'stylelint-bundle': [
|
||||
'stylelint-bundle.min.js'
|
||||
],
|
||||
'stylus-lang-bundle': [
|
||||
'stylus.min.js'
|
||||
]
|
||||
};
|
||||
|
||||
async function updateReadme(lib) {
|
||||
const pkg = await fs.readJson(`${root}/node_modules/${lib}/package.json`);
|
||||
const file = `${root}/vendor/${lib}/README.md`;
|
||||
const txt = await fs.readFile(file, 'utf8');
|
||||
return fs.writeFile(file, txt.replace(/\bv[\d.]+[-\w]*\b/g, `v${pkg.version}`));
|
||||
}
|
||||
|
||||
function isFolder(fileOrFolder) {
|
||||
const stat = fs.statSync(fileOrFolder);
|
||||
return stat.isDirectory();
|
||||
}
|
||||
|
||||
function updateExisting(lib) {
|
||||
const libRoot = `${root}/node_modules/`;
|
||||
const vendorRoot = `${root}/vendor/`;
|
||||
const folders = [lib];
|
||||
|
||||
const process = function () {
|
||||
if (folders.length) {
|
||||
const folder = folders.shift();
|
||||
const folderRoot = `${vendorRoot}${folder}`;
|
||||
const entries = fs.readdirSync(folderRoot);
|
||||
entries.forEach(entry => {
|
||||
// Ignore README.md & LICENSE files
|
||||
if (entry !== 'README.md' && entry !== 'LICENSE') {
|
||||
const entryPath = `${folderRoot}/${entry}`;
|
||||
try {
|
||||
if (fs.existsSync(entryPath)) {
|
||||
if (isFolder(entryPath)) {
|
||||
folders.push(`${folder}/${entry}`);
|
||||
} else {
|
||||
fs.copySync(`${libRoot}${folder}/${entry}`, entryPath);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
// Show error in case file exists in vendor, but not in node_modules
|
||||
console.log('\x1b[36m%s\x1b[0m', `"${entryPath}" doesn't exist!`);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (folders.length) {
|
||||
process();
|
||||
}
|
||||
};
|
||||
|
||||
process();
|
||||
}
|
||||
|
||||
async function copy(lib, folder) {
|
||||
const [src, dest] = folder.split(/\s*→\s*/);
|
||||
try {
|
||||
if (folder === '*') {
|
||||
updateExisting(lib);
|
||||
} else {
|
||||
await fs.copy(`${root}/node_modules/${lib}/${src}`, `${root}/vendor/${lib}/${dest || src}`);
|
||||
}
|
||||
} catch (err) {
|
||||
exit(err);
|
||||
}
|
||||
}
|
||||
|
||||
function exit(err) {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
}
|
||||
process.exit(err ? 1 : 0);
|
||||
}
|
||||
|
||||
Object.keys(files).forEach(lib => {
|
||||
updateReadme(lib);
|
||||
files[lib].forEach(folder => {
|
||||
if (folder === '*') {
|
||||
updateExisting(lib);
|
||||
} else {
|
||||
copy(lib, folder);
|
||||
}
|
||||
});
|
||||
console.log('\x1b[32m%s\x1b[0m', `${lib} files updated`);
|
||||
});
|
70
tools/update-versions.js
Normal file
70
tools/update-versions.js
Normal file
|
@ -0,0 +1,70 @@
|
|||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
const root = path.join(__dirname, '..');
|
||||
|
||||
const good = '\x1b[32m%s\x1b[0m';
|
||||
const warn = '\x1b[36m%s\x1b[0m';
|
||||
|
||||
function exit(err) {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
}
|
||||
process.exit(err ? 1 : 0);
|
||||
}
|
||||
|
||||
function verToArray(v) {
|
||||
return v.replace('v', '').split('.').map(Number);
|
||||
}
|
||||
|
||||
// Simple compare function since we can't require semverCompare here
|
||||
function compare(v1, v2) {
|
||||
if (v1 === v2) {
|
||||
return 0;
|
||||
}
|
||||
const [maj1, min1, pat1] = verToArray(v1);
|
||||
const [maj2, min2, pat2] = verToArray(v2);
|
||||
const majMatch = maj1 === maj2;
|
||||
const minMatch = min1 === min2;
|
||||
if (
|
||||
maj1 > maj2 ||
|
||||
majMatch && min1 > min2 ||
|
||||
majMatch && minMatch && pat1 > pat2
|
||||
) {
|
||||
return 1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
async function updateVersions() {
|
||||
const regexp = /"([v\d.]+)"/;
|
||||
const manifest = await fs.readFile(`${root}/manifest.json`, 'utf8');
|
||||
const pkg = await fs.readFile(`${root}/package.json`, 'utf8');
|
||||
const manifestVersion = manifest.match(regexp);
|
||||
const pkgVersion = pkg.match(regexp);
|
||||
if (manifestVersion && pkgVersion) {
|
||||
const result = compare(manifestVersion[1], pkgVersion[1]);
|
||||
let match, version, file, str;
|
||||
if (result === 0) {
|
||||
return console.log(good, 'Manifest & package versions match');
|
||||
} else if (result > 0) {
|
||||
match = pkgVersion;
|
||||
version = manifestVersion[1];
|
||||
file = 'package.json';
|
||||
str = pkg;
|
||||
} else {
|
||||
match = manifestVersion;
|
||||
version = pkgVersion[1];
|
||||
file = 'manifest.json';
|
||||
str = manifest;
|
||||
}
|
||||
console.log(warn, `Updating ${file} to ${version}`);
|
||||
str = str.slice(0, match.index + 1) + version + str.slice(match.index + match[1].length + 1);
|
||||
return fs.writeFile(`${root}/${file}`, str);
|
||||
}
|
||||
throw Error(`Error reading ${manifestVersion ? '' : 'manifest.json'} ${pkgVersion ? '' : 'package.json'}`);
|
||||
}
|
||||
|
||||
updateVersions().catch(err => exit(err));
|
46
tools/zip.js
Normal file
46
tools/zip.js
Normal file
|
@ -0,0 +1,46 @@
|
|||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const archiver = require('archiver');
|
||||
|
||||
function createZip() {
|
||||
const fileName = 'stylus.zip';
|
||||
const exclude = [
|
||||
'.*', // dot files/folders (glob, not regexp)
|
||||
'node_modules',
|
||||
'tools',
|
||||
'package.json',
|
||||
'*.zip'
|
||||
];
|
||||
|
||||
const file = fs.createWriteStream(fileName);
|
||||
const archive = archiver('zip');
|
||||
return new Promise((resolve, reject) => {
|
||||
archive.on('finish', () => {
|
||||
resolve();
|
||||
});
|
||||
archive.on('warning', err => {
|
||||
if (err.code === 'ENOENT') {
|
||||
console.log('\x1b[33m%s\x1b[0m', 'Warning', err.message);
|
||||
} else {
|
||||
reject();
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
archive.on('error', err => {
|
||||
reject();
|
||||
throw err;
|
||||
});
|
||||
|
||||
archive.pipe(file);
|
||||
archive.glob(`!(${exclude.join('|')})`);
|
||||
archive.finalize();
|
||||
});
|
||||
}
|
||||
|
||||
createZip()
|
||||
.then(() => console.log('\x1b[32m%s\x1b[0m', 'Stylus zip complete'))
|
||||
.catch(err => {
|
||||
throw err;
|
||||
});
|
9
vendor-overwrites/beautify/README.md
Normal file
9
vendor-overwrites/beautify/README.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
## beautify-css - modified from v1.6.12
|
||||
|
||||
Beautify-css was **heavily** modified from its source:
|
||||
|
||||
https://github.com/beautify-web/js-beautify/blob/v1.6.12/js/lib/beautify-css.js
|
||||
|
||||
After this version the source repo split the file and built it using webpack.
|
||||
|
||||
Our version has more options & modes. It should be considered a fork of the original.
|
7
vendor-overwrites/colorpicker/README.md
Normal file
7
vendor-overwrites/colorpicker/README.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
## color-picker - forked from v1.0.9
|
||||
|
||||
codemirror-colorpicker was **heavily** modified from its source:
|
||||
|
||||
https://github.com/easylogic/codemirror-colorpicker/...
|
||||
|
||||
Shortly after this version the source repo split the file and built it using rollup. It should be considered a fork of the original.
|
3
vendor-overwrites/csslint/README.md
Normal file
3
vendor-overwrites/csslint/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
## css-lint - modified from v0.10.0 (2013-08-15)
|
||||
|
||||
This version has been **heavily** modified since [it was originally added](https://github.com/openstyles/stylus/commit/b4173d68f6312300ab761f5454d7a8fb230d2bce#diff-4392791c2f6559cb1de01b0e1f3e1c08) in Stylish v1.3.0. It should be considered a fork of the [original](https://github.com/CSSLint/csslint).
|
26
vendor/README.md
vendored
Normal file
26
vendor/README.md
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Vendor files are populated by the build script:
|
||||
|
||||
## What the build script does
|
||||
|
||||
Using this repo, run `npm install`... the latest versions of:
|
||||
|
||||
* `CodeMirror` (https://github.com/codemirror/CodeMirror) is installed.
|
||||
* `jsonlint` (https://github.com/zaach/jsonlint) is installed.
|
||||
* `less` (https://github.com/less/less.js) is installed.
|
||||
* `lz-string-unsafe` (https://github.com/openstyles/lz-string-unsafe) is installed.
|
||||
* `semver-bundle` (https://github.com/openstyles/semver-bundle) is installed.
|
||||
* `stylus-lang` (https://github.com/openstyles/stylus-lang-bundle) is installed.<br><br>
|
||||
* The necessary build tools are installed; see `devDependencies` in the `package.json`.
|
||||
|
||||
## Running the build script
|
||||
|
||||
Use `npm run build` to first update the packages in the `node_modules` folder & then update the vendor folder.
|
||||
|
||||
The following changes are made:
|
||||
|
||||
* `CodeMirror`: Only existing files are updated directly from the `node_modules` folder; see the [CodeMirror readme](codemirror/README) for specifics.
|
||||
* `jsonlint`: The uncompressed `lib/jsonlint.js` is copied directly to `vendor/jsonlint`.
|
||||
* `less`: The compressed `dist/less.min.js` file is copied directly into `vendor/less`.
|
||||
* `lz-string-unsafe`: The compressed `lz-string-unsafe.min.js` file is copied directly into `vendor/lz-string-unsafe`.
|
||||
* `semver-bundle`: The `dist/semver.js` file is copied directly into `vendor/semver`.
|
||||
* `stylus-lang-bundle`: The `stylus.min.js` file is copied directly into `vendor/stylus-lang-bundle`.
|
3
vendor/codemirror/README.md
vendored
Normal file
3
vendor/codemirror/README.md
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
## CodeMirror v5.39.2
|
||||
|
||||
Only files & folders that exist in the `vendor/codemirror` folder are copied from the `node_modules/codemirror` folder. Except all theme files are copied, in case new themes have been added.
|
4
vendor/codemirror/addon/dialog/dialog.js
vendored
4
vendor/codemirror/addon/dialog/dialog.js
vendored
|
@ -25,6 +25,7 @@
|
|||
} else { // Assuming it's a detached DOM element.
|
||||
dialog.appendChild(template);
|
||||
}
|
||||
CodeMirror.addClass(wrap, 'dialog-opened');
|
||||
return dialog;
|
||||
}
|
||||
|
||||
|
@ -47,6 +48,7 @@
|
|||
} else {
|
||||
if (closed) return;
|
||||
closed = true;
|
||||
CodeMirror.rmClass(dialog.parentNode, 'dialog-opened');
|
||||
dialog.parentNode.removeChild(dialog);
|
||||
me.focus();
|
||||
|
||||
|
@ -102,6 +104,7 @@
|
|||
function close() {
|
||||
if (closed) return;
|
||||
closed = true;
|
||||
CodeMirror.rmClass(dialog.parentNode, 'dialog-opened');
|
||||
dialog.parentNode.removeChild(dialog);
|
||||
me.focus();
|
||||
}
|
||||
|
@ -141,6 +144,7 @@
|
|||
if (closed) return;
|
||||
closed = true;
|
||||
clearTimeout(doneTimer);
|
||||
CodeMirror.rmClass(dialog.parentNode, 'dialog-opened');
|
||||
dialog.parentNode.removeChild(dialog);
|
||||
}
|
||||
|
||||
|
|
18
vendor/codemirror/addon/hint/show-hint.js
vendored
18
vendor/codemirror/addon/hint/show-hint.js
vendored
|
@ -98,7 +98,7 @@
|
|||
var pos = this.cm.getCursor(), line = this.cm.getLine(pos.line);
|
||||
if (pos.line != this.startPos.line || line.length - pos.ch != this.startLen - this.startPos.ch ||
|
||||
pos.ch < this.startPos.ch || this.cm.somethingSelected() ||
|
||||
(pos.ch && this.options.closeCharacters.test(line.charAt(pos.ch - 1)))) {
|
||||
(!pos.ch || this.options.closeCharacters.test(line.charAt(pos.ch - 1)))) {
|
||||
this.close();
|
||||
} else {
|
||||
var self = this;
|
||||
|
@ -200,7 +200,8 @@
|
|||
var widget = this, cm = completion.cm;
|
||||
|
||||
var hints = this.hints = document.createElement("ul");
|
||||
hints.className = "CodeMirror-hints";
|
||||
var theme = completion.cm.options.theme;
|
||||
hints.className = "CodeMirror-hints " + theme;
|
||||
this.selectedHint = data.selectedHint || 0;
|
||||
|
||||
var completions = data.list;
|
||||
|
@ -333,7 +334,7 @@
|
|||
i = avoidWrap ? 0 : this.data.list.length - 1;
|
||||
if (this.selectedHint == i) return;
|
||||
var node = this.hints.childNodes[this.selectedHint];
|
||||
node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, "");
|
||||
if (node) node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, "");
|
||||
node = this.hints.childNodes[this.selectedHint = i];
|
||||
node.className += " " + ACTIVE_HINT_ELEMENT_CLASS;
|
||||
if (node.offsetTop < this.hints.scrollTop)
|
||||
|
@ -397,12 +398,13 @@
|
|||
});
|
||||
|
||||
CodeMirror.registerHelper("hint", "fromList", function(cm, options) {
|
||||
var cur = cm.getCursor(), token = cm.getTokenAt(cur);
|
||||
var to = CodeMirror.Pos(cur.line, token.end);
|
||||
if (token.string && /\w/.test(token.string[token.string.length - 1])) {
|
||||
var term = token.string, from = CodeMirror.Pos(cur.line, token.start);
|
||||
var cur = cm.getCursor(), token = cm.getTokenAt(cur)
|
||||
var term, from = CodeMirror.Pos(cur.line, token.start), to = cur
|
||||
if (token.start < cur.ch && /\w/.test(token.string.charAt(cur.ch - token.start - 1))) {
|
||||
term = token.string.substr(0, cur.ch - token.start)
|
||||
} else {
|
||||
var term = "", from = to;
|
||||
term = ""
|
||||
from = cur
|
||||
}
|
||||
var found = [];
|
||||
for (var i = 0; i < options.words.length; i++) {
|
||||
|
|
3
vendor/codemirror/addon/lint/json-lint.js
vendored
3
vendor/codemirror/addon/lint/json-lint.js
vendored
|
@ -23,6 +23,9 @@ CodeMirror.registerHelper("lint", "json", function(text) {
|
|||
}
|
||||
return found;
|
||||
}
|
||||
// for jsonlint's web dist jsonlint is exported as an object with a single property parser, of which parseError
|
||||
// is a subproperty
|
||||
var jsonlint = window.jsonlint.parser || window.jsonlint
|
||||
jsonlint.parseError = function(str, hash) {
|
||||
var loc = hash.loc;
|
||||
found.push({from: CodeMirror.Pos(loc.first_line - 1, loc.first_column),
|
||||
|
|
1
vendor/codemirror/keymap/emacs.js
vendored
1
vendor/codemirror/keymap/emacs.js
vendored
|
@ -307,6 +307,7 @@
|
|||
"Backspace": function(cm) { killRegion(cm, false) || killTo(cm, byChar, -1, false); },
|
||||
|
||||
"Alt-F": move(byWord, 1), "Alt-B": move(byWord, -1),
|
||||
"Alt-Right": move(byWord, 1), "Alt-Left": move(byWord, -1),
|
||||
"Alt-D": function(cm) { killTo(cm, byWord, 1, "grow"); },
|
||||
"Alt-Backspace": function(cm) { killTo(cm, byWord, -1, "grow"); },
|
||||
|
||||
|
|
188
vendor/codemirror/keymap/vim.js
vendored
188
vendor/codemirror/keymap/vim.js
vendored
|
@ -93,6 +93,8 @@
|
|||
{ keys: 'gE', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: true, bigWord: true, inclusive: true }},
|
||||
{ keys: '{', type: 'motion', motion: 'moveByParagraph', motionArgs: { forward: false, toJumplist: true }},
|
||||
{ keys: '}', type: 'motion', motion: 'moveByParagraph', motionArgs: { forward: true, toJumplist: true }},
|
||||
{ keys: '(', type: 'motion', motion: 'moveBySentence', motionArgs: { forward: false }},
|
||||
{ keys: ')', type: 'motion', motion: 'moveBySentence', motionArgs: { forward: true }},
|
||||
{ keys: '<C-f>', type: 'motion', motion: 'moveByPage', motionArgs: { forward: true }},
|
||||
{ keys: '<C-b>', type: 'motion', motion: 'moveByPage', motionArgs: { forward: false }},
|
||||
{ keys: '<C-d>', type: 'motion', motion: 'moveByScroll', motionArgs: { forward: true, explicitRepeat: true }},
|
||||
|
@ -423,6 +425,9 @@
|
|||
function isWhiteSpaceString(k) {
|
||||
return (/^\s*$/).test(k);
|
||||
}
|
||||
function isEndOfSentenceSymbol(k) {
|
||||
return '.?!'.indexOf(k) != -1;
|
||||
}
|
||||
function inArray(val, arr) {
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (arr[i] == val) {
|
||||
|
@ -866,7 +871,7 @@
|
|||
if (vim.insertMode) { command = handleKeyInsertMode(); }
|
||||
else { command = handleKeyNonInsertMode(); }
|
||||
if (command === false) {
|
||||
return undefined;
|
||||
return !vim.insertMode && key.length === 1 ? function() { return true; } : undefined;
|
||||
} else if (command === true) {
|
||||
// TODO: Look into using CodeMirror's multi-key handling.
|
||||
// Return no-op since we are caching the key. Counts as handled, but
|
||||
|
@ -1811,6 +1816,10 @@
|
|||
var dir = motionArgs.forward ? 1 : -1;
|
||||
return findParagraph(cm, head, motionArgs.repeat, dir);
|
||||
},
|
||||
moveBySentence: function(cm, head, motionArgs) {
|
||||
var dir = motionArgs.forward ? 1 : -1;
|
||||
return findSentence(cm, head, motionArgs.repeat, dir);
|
||||
},
|
||||
moveByScroll: function(cm, head, motionArgs, vim) {
|
||||
var scrollbox = cm.getScrollInfo();
|
||||
var curEnd = null;
|
||||
|
@ -3534,6 +3543,179 @@
|
|||
return { start: start, end: end };
|
||||
}
|
||||
|
||||
function findSentence(cm, cur, repeat, dir) {
|
||||
|
||||
/*
|
||||
Takes an index object
|
||||
{
|
||||
line: the line string,
|
||||
ln: line number,
|
||||
pos: index in line,
|
||||
dir: direction of traversal (-1 or 1)
|
||||
}
|
||||
and modifies the line, ln, and pos members to represent the
|
||||
next valid position or sets them to null if there are
|
||||
no more valid positions.
|
||||
*/
|
||||
function nextChar(cm, idx) {
|
||||
if (idx.pos + idx.dir < 0 || idx.pos + idx.dir >= idx.line.length) {
|
||||
idx.ln += idx.dir;
|
||||
if (!isLine(cm, idx.ln)) {
|
||||
idx.line = null;
|
||||
idx.ln = null;
|
||||
idx.pos = null;
|
||||
return;
|
||||
}
|
||||
idx.line = cm.getLine(idx.ln);
|
||||
idx.pos = (idx.dir > 0) ? 0 : idx.line.length - 1;
|
||||
}
|
||||
else {
|
||||
idx.pos += idx.dir;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Performs one iteration of traversal in forward direction
|
||||
Returns an index object of the new location
|
||||
*/
|
||||
function forward(cm, ln, pos, dir) {
|
||||
var line = cm.getLine(ln);
|
||||
var stop = (line === "");
|
||||
|
||||
var curr = {
|
||||
line: line,
|
||||
ln: ln,
|
||||
pos: pos,
|
||||
dir: dir,
|
||||
}
|
||||
|
||||
var last_valid = {
|
||||
ln: curr.ln,
|
||||
pos: curr.pos,
|
||||
}
|
||||
|
||||
var skip_empty_lines = (curr.line === "");
|
||||
|
||||
// Move one step to skip character we start on
|
||||
nextChar(cm, curr);
|
||||
|
||||
while (curr.line !== null) {
|
||||
last_valid.ln = curr.ln;
|
||||
last_valid.pos = curr.pos;
|
||||
|
||||
if (curr.line === "" && !skip_empty_lines) {
|
||||
return { ln: curr.ln, pos: curr.pos, };
|
||||
}
|
||||
else if (stop && curr.line !== "" && !isWhiteSpaceString(curr.line[curr.pos])) {
|
||||
return { ln: curr.ln, pos: curr.pos, };
|
||||
}
|
||||
else if (isEndOfSentenceSymbol(curr.line[curr.pos])
|
||||
&& !stop
|
||||
&& (curr.pos === curr.line.length - 1
|
||||
|| isWhiteSpaceString(curr.line[curr.pos + 1]))) {
|
||||
stop = true;
|
||||
}
|
||||
|
||||
nextChar(cm, curr);
|
||||
}
|
||||
|
||||
/*
|
||||
Set the position to the last non whitespace character on the last
|
||||
valid line in the case that we reach the end of the document.
|
||||
*/
|
||||
var line = cm.getLine(last_valid.ln);
|
||||
last_valid.pos = 0;
|
||||
for(var i = line.length - 1; i >= 0; --i) {
|
||||
if (!isWhiteSpaceString(line[i])) {
|
||||
last_valid.pos = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return last_valid;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
Performs one iteration of traversal in reverse direction
|
||||
Returns an index object of the new location
|
||||
*/
|
||||
function reverse(cm, ln, pos, dir) {
|
||||
var line = cm.getLine(ln);
|
||||
|
||||
var curr = {
|
||||
line: line,
|
||||
ln: ln,
|
||||
pos: pos,
|
||||
dir: dir,
|
||||
}
|
||||
|
||||
var last_valid = {
|
||||
ln: curr.ln,
|
||||
pos: null,
|
||||
};
|
||||
|
||||
var skip_empty_lines = (curr.line === "");
|
||||
|
||||
// Move one step to skip character we start on
|
||||
nextChar(cm, curr);
|
||||
|
||||
while (curr.line !== null) {
|
||||
|
||||
if (curr.line === "" && !skip_empty_lines) {
|
||||
if (last_valid.pos !== null) {
|
||||
return last_valid;
|
||||
}
|
||||
else {
|
||||
return { ln: curr.ln, pos: curr.pos };
|
||||
}
|
||||
}
|
||||
else if (isEndOfSentenceSymbol(curr.line[curr.pos])
|
||||
&& last_valid.pos !== null
|
||||
&& !(curr.ln === last_valid.ln && curr.pos + 1 === last_valid.pos)) {
|
||||
return last_valid;
|
||||
}
|
||||
else if (curr.line !== "" && !isWhiteSpaceString(curr.line[curr.pos])) {
|
||||
skip_empty_lines = false;
|
||||
last_valid = { ln: curr.ln, pos: curr.pos }
|
||||
}
|
||||
|
||||
nextChar(cm, curr);
|
||||
}
|
||||
|
||||
/*
|
||||
Set the position to the first non whitespace character on the last
|
||||
valid line in the case that we reach the beginning of the document.
|
||||
*/
|
||||
var line = cm.getLine(last_valid.ln);
|
||||
last_valid.pos = 0;
|
||||
for(var i = 0; i < line.length; ++i) {
|
||||
if (!isWhiteSpaceString(line[i])) {
|
||||
last_valid.pos = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return last_valid;
|
||||
}
|
||||
|
||||
var curr_index = {
|
||||
ln: cur.line,
|
||||
pos: cur.ch,
|
||||
};
|
||||
|
||||
while (repeat > 0) {
|
||||
if (dir < 0) {
|
||||
curr_index = reverse(cm, curr_index.ln, curr_index.pos, dir);
|
||||
}
|
||||
else {
|
||||
curr_index = forward(cm, curr_index.ln, curr_index.pos, dir);
|
||||
}
|
||||
repeat--;
|
||||
}
|
||||
|
||||
return Pos(curr_index.ln, curr_index.pos);
|
||||
}
|
||||
|
||||
// TODO: perhaps this finagling of start and end positions belonds
|
||||
// in codemirror/replaceRange?
|
||||
function selectCompanionObject(cm, head, symb, inclusive) {
|
||||
|
@ -3552,8 +3734,8 @@
|
|||
// cursor is on a matching open bracket.
|
||||
var offset = curChar === openSym ? 1 : 0;
|
||||
|
||||
start = cm.scanForBracket(Pos(cur.line, cur.ch + offset), -1, null, {'bracketRegex': bracketRegexp});
|
||||
end = cm.scanForBracket(Pos(cur.line, cur.ch + offset), 1, null, {'bracketRegex': bracketRegexp});
|
||||
start = cm.scanForBracket(Pos(cur.line, cur.ch + offset), -1, undefined, {'bracketRegex': bracketRegexp});
|
||||
end = cm.scanForBracket(Pos(cur.line, cur.ch + offset), 1, undefined, {'bracketRegex': bracketRegexp});
|
||||
|
||||
if (!start || !end) {
|
||||
return { start: cur, end: cur };
|
||||
|
|
7496
vendor/codemirror/lib/codemirror.js
vendored
7496
vendor/codemirror/lib/codemirror.js
vendored
File diff suppressed because it is too large
Load Diff
107
vendor/codemirror/mode/javascript/javascript.js
vendored
107
vendor/codemirror/mode/javascript/javascript.js
vendored
|
@ -75,17 +75,10 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|||
return ret(ch);
|
||||
} else if (ch == "=" && stream.eat(">")) {
|
||||
return ret("=>", "operator");
|
||||
} else if (ch == "0" && stream.eat(/x/i)) {
|
||||
stream.eatWhile(/[\da-f]/i);
|
||||
return ret("number", "number");
|
||||
} else if (ch == "0" && stream.eat(/o/i)) {
|
||||
stream.eatWhile(/[0-7]/i);
|
||||
return ret("number", "number");
|
||||
} else if (ch == "0" && stream.eat(/b/i)) {
|
||||
stream.eatWhile(/[01]/i);
|
||||
} else if (ch == "0" && stream.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i)) {
|
||||
return ret("number", "number");
|
||||
} else if (/\d/.test(ch)) {
|
||||
stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);
|
||||
stream.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/);
|
||||
return ret("number", "number");
|
||||
} else if (ch == "/") {
|
||||
if (stream.eat("*")) {
|
||||
|
@ -96,7 +89,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|||
return ret("comment", "comment");
|
||||
} else if (expressionAllowed(stream, state, 1)) {
|
||||
readRegexp(stream);
|
||||
stream.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);
|
||||
stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/);
|
||||
return ret("regexp", "string-2");
|
||||
} else {
|
||||
stream.eat("=");
|
||||
|
@ -126,7 +119,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|||
var kw = keywords[word]
|
||||
return ret(kw.type, kw.style, word)
|
||||
}
|
||||
if (word == "async" && stream.match(/^(\s|\/\*.*?\*\/)*[\(\w]/, false))
|
||||
if (word == "async" && stream.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/, false))
|
||||
return ret("async", "keyword", word)
|
||||
}
|
||||
return ret("variable", "variable", word)
|
||||
|
@ -265,21 +258,42 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|||
pass.apply(null, arguments);
|
||||
return true;
|
||||
}
|
||||
function inList(name, list) {
|
||||
for (var v = list; v; v = v.next) if (v.name == name) return true
|
||||
return false;
|
||||
}
|
||||
function register(varname) {
|
||||
function inList(list) {
|
||||
for (var v = list; v; v = v.next)
|
||||
if (v.name == varname) return true;
|
||||
return false;
|
||||
}
|
||||
var state = cx.state;
|
||||
cx.marked = "def";
|
||||
if (state.context) {
|
||||
if (inList(state.localVars)) return;
|
||||
state.localVars = {name: varname, next: state.localVars};
|
||||
if (state.lexical.info == "var" && state.context && state.context.block) {
|
||||
// FIXME function decls are also not block scoped
|
||||
var newContext = registerVarScoped(varname, state.context)
|
||||
if (newContext != null) {
|
||||
state.context = newContext
|
||||
return
|
||||
}
|
||||
} else if (!inList(varname, state.localVars)) {
|
||||
state.localVars = new Var(varname, state.localVars)
|
||||
return
|
||||
}
|
||||
}
|
||||
// Fall through means this is global
|
||||
if (parserConfig.globalVars && !inList(varname, state.globalVars))
|
||||
state.globalVars = new Var(varname, state.globalVars)
|
||||
}
|
||||
function registerVarScoped(varname, context) {
|
||||
if (!context) {
|
||||
return null
|
||||
} else if (context.block) {
|
||||
var inner = registerVarScoped(varname, context.prev)
|
||||
if (!inner) return null
|
||||
if (inner == context.prev) return context
|
||||
return new Context(inner, context.vars, true)
|
||||
} else if (inList(varname, context.vars)) {
|
||||
return context
|
||||
} else {
|
||||
if (inList(state.globalVars)) return;
|
||||
if (parserConfig.globalVars)
|
||||
state.globalVars = {name: varname, next: state.globalVars};
|
||||
return new Context(context.prev, new Var(varname, context.vars), false)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -289,15 +303,23 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|||
|
||||
// Combinators
|
||||
|
||||
var defaultVars = {name: "this", next: {name: "arguments"}};
|
||||
function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block }
|
||||
function Var(name, next) { this.name = name; this.next = next }
|
||||
|
||||
var defaultVars = new Var("this", new Var("arguments", null))
|
||||
function pushcontext() {
|
||||
cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};
|
||||
cx.state.localVars = defaultVars;
|
||||
cx.state.context = new Context(cx.state.context, cx.state.localVars, false)
|
||||
cx.state.localVars = defaultVars
|
||||
}
|
||||
function pushblockcontext() {
|
||||
cx.state.context = new Context(cx.state.context, cx.state.localVars, true)
|
||||
cx.state.localVars = null
|
||||
}
|
||||
function popcontext() {
|
||||
cx.state.localVars = cx.state.context.vars;
|
||||
cx.state.context = cx.state.context.prev;
|
||||
cx.state.localVars = cx.state.context.vars
|
||||
cx.state.context = cx.state.context.prev
|
||||
}
|
||||
popcontext.lex = true
|
||||
function pushlex(type, info) {
|
||||
var result = function() {
|
||||
var state = cx.state, indent = state.indented;
|
||||
|
@ -322,19 +344,19 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|||
function expect(wanted) {
|
||||
function exp(type) {
|
||||
if (type == wanted) return cont();
|
||||
else if (wanted == ";") return pass();
|
||||
else if (wanted == ";" || type == "}" || type == ")" || type == "]") return pass();
|
||||
else return cont(exp);
|
||||
};
|
||||
return exp;
|
||||
}
|
||||
|
||||
function statement(type, value) {
|
||||
if (type == "var") return cont(pushlex("vardef", value.length), vardef, expect(";"), poplex);
|
||||
if (type == "var") return cont(pushlex("vardef", value), vardef, expect(";"), poplex);
|
||||
if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex);
|
||||
if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
|
||||
if (type == "keyword d") return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex);
|
||||
if (type == "debugger") return cont(expect(";"));
|
||||
if (type == "{") return cont(pushlex("}"), block, poplex);
|
||||
if (type == "{") return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext);
|
||||
if (type == ";") return cont();
|
||||
if (type == "if") {
|
||||
if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
|
||||
|
@ -356,22 +378,27 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|||
} else if (isTS && value == "namespace") {
|
||||
cx.marked = "keyword"
|
||||
return cont(pushlex("form"), expression, block, poplex)
|
||||
} else if (isTS && value == "abstract") {
|
||||
cx.marked = "keyword"
|
||||
return cont(statement)
|
||||
} else {
|
||||
return cont(pushlex("stat"), maybelabel);
|
||||
}
|
||||
}
|
||||
if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"),
|
||||
block, poplex, poplex);
|
||||
if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), pushblockcontext,
|
||||
block, poplex, poplex, popcontext);
|
||||
if (type == "case") return cont(expression, expect(":"));
|
||||
if (type == "default") return cont(expect(":"));
|
||||
if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"),
|
||||
statement, poplex, popcontext);
|
||||
if (type == "catch") return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext);
|
||||
if (type == "export") return cont(pushlex("stat"), afterExport, poplex);
|
||||
if (type == "import") return cont(pushlex("stat"), afterImport, poplex);
|
||||
if (type == "async") return cont(statement)
|
||||
if (value == "@") return cont(expression, statement)
|
||||
return pass(pushlex("stat"), expression, expect(";"), poplex);
|
||||
}
|
||||
function maybeCatchBinding(type) {
|
||||
if (type == "(") return cont(funarg, expect(")"))
|
||||
}
|
||||
function expression(type, value) {
|
||||
return expressionInner(type, value, false);
|
||||
}
|
||||
|
@ -562,7 +589,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|||
function typeexpr(type, value) {
|
||||
if (value == "keyof" || value == "typeof") {
|
||||
cx.marked = "keyword"
|
||||
return cont(value == "keyof" ? typeexpr : expression)
|
||||
return cont(value == "keyof" ? typeexpr : expressionNoComma)
|
||||
}
|
||||
if (type == "variable" || value == "void") {
|
||||
cx.marked = "type"
|
||||
|
@ -572,6 +599,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|||
if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType)
|
||||
if (type == "{") return cont(pushlex("}"), commasep(typeprop, "}", ",;"), poplex, afterType)
|
||||
if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType)
|
||||
if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr)
|
||||
}
|
||||
function maybeReturnType(type) {
|
||||
if (type == "=>") return cont(typeexpr)
|
||||
|
@ -588,9 +616,10 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|||
return cont(expression, maybetype, expect("]"), typeprop)
|
||||
}
|
||||
}
|
||||
function typearg(type) {
|
||||
if (type == "variable") return cont(typearg)
|
||||
else if (type == ":") return cont(typeexpr)
|
||||
function typearg(type, value) {
|
||||
if (type == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?") return cont(typearg)
|
||||
if (type == ":") return cont(typeexpr)
|
||||
return pass(typeexpr)
|
||||
}
|
||||
function afterType(type, value) {
|
||||
if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
|
||||
|
@ -778,7 +807,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|||
cc: [],
|
||||
lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
|
||||
localVars: parserConfig.localVars,
|
||||
context: parserConfig.localVars && {vars: parserConfig.localVars},
|
||||
context: parserConfig.localVars && new Context(null, null, false),
|
||||
indented: basecolumn || 0
|
||||
};
|
||||
if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
|
||||
|
@ -819,7 +848,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
|||
lexical = lexical.prev;
|
||||
var type = lexical.type, closing = firstChar == type;
|
||||
|
||||
if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info + 1 : 0);
|
||||
if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0);
|
||||
else if (type == "form" && firstChar == "{") return lexical.indented;
|
||||
else if (type == "form") return lexical.indented + indentUnit;
|
||||
else if (type == "stat")
|
||||
|
|
46
vendor/codemirror/theme/darcula.css
vendored
Normal file
46
vendor/codemirror/theme/darcula.css
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
/**
|
||||
Name: IntelliJ IDEA darcula theme
|
||||
From IntelliJ IDEA by JetBrains
|
||||
*/
|
||||
|
||||
.cm-s-darcula span.cm-meta { color: #BBB529; }
|
||||
.cm-s-darcula span.cm-number { color: #6897BB; }
|
||||
.cm-s-darcula span.cm-keyword { line-height: 1em; font-weight: bold; color: #CC7832; }
|
||||
.cm-s-darcula span.cm-def { color: #FFC66D; }
|
||||
.cm-s-darcula span.cm-variable { color: #A9B7C6; }
|
||||
.cm-s-darcula span.cm-variable-2 { color: #A9B7C6; }
|
||||
.cm-s-darcula span.cm-variable-3, .cm-s-darcula span.cm-type { color: #A9B7C6; }
|
||||
.cm-s-darcula span.cm-property { color: #A9B7C6; }
|
||||
.cm-s-darcula span.cm-operator { color: #A9B7C6; }
|
||||
.cm-s-darcula span.cm-string { color: #6A8759; }
|
||||
.cm-s-darcula span.cm-string-2 { color: #6A8759; }
|
||||
.cm-s-darcula span.cm-comment { color: #808080; }
|
||||
.cm-s-darcula span.cm-link { color: #287BDE; }
|
||||
.cm-s-darcula span.cm-atom { font-weight: bold; color: #CC7832; }
|
||||
.cm-s-darcula span.cm-error { color: #BC3F3C; }
|
||||
.cm-s-darcula span.cm-tag { color: #CC7832; }
|
||||
.cm-s-darcula span.cm-attribute { color: #6A8759; }
|
||||
.cm-s-darcula span.cm-qualifier { color: #6A8759; }
|
||||
.cm-s-darcula span.cm-bracket { color: #A9B7C6; }
|
||||
.cm-s-darcula.CodeMirror { background: #2B2B2B; color: #A9B7C6; }
|
||||
|
||||
|
||||
.cm-s-darcula .CodeMirror-cursor { border-left: 1px solid #dddddd; }
|
||||
.cm-s-darcula .CodeMirror-activeline-background { background: #3A3A3A; }
|
||||
.cm-s-darcula div.CodeMirror-selected { background: #085a9c; }
|
||||
.cm-s-darcula .CodeMirror-gutters { background: rgb(72, 72, 72); border-right: 1px solid grey; color: #606366 }
|
||||
|
||||
.cm-s-darcula span.cm-builtin { color: #A9B7C6; }
|
||||
.cm-s-darcula { font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;}
|
||||
.cm-s-darcula .CodeMirror-matchingbracket { background-color: #3b514d; color: yellow !important; }
|
||||
|
||||
.CodeMirror-hints.darcula {
|
||||
font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
|
||||
color: #9c9e9e;
|
||||
background-color: #3b3e3f !important;
|
||||
}
|
||||
|
||||
.CodeMirror-hints.darcula .CodeMirror-hint-active {
|
||||
background-color: #494d4e !important;
|
||||
color: #9c9e9e !important;
|
||||
}
|
34
vendor/codemirror/theme/gruvbox-dark.css
vendored
Normal file
34
vendor/codemirror/theme/gruvbox-dark.css
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
|
||||
Name: gruvbox-dark
|
||||
Author: kRkk (https://github.com/krkk)
|
||||
|
||||
Original gruvbox color scheme by Pavel Pertsev (https://github.com/morhetz/gruvbox)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-gruvbox-dark.CodeMirror, .cm-s-gruvbox-dark .CodeMirror-gutters { background-color: #282828; color: #bdae93; }
|
||||
.cm-s-gruvbox-dark .CodeMirror-gutters {background: #282828; border-right: 0px;}
|
||||
.cm-s-gruvbox-dark .CodeMirror-linenumber {color: #7c6f64;}
|
||||
.cm-s-gruvbox-dark .CodeMirror-cursor { border-left: 1px solid #ebdbb2; }
|
||||
.cm-s-gruvbox-dark div.CodeMirror-selected { background: #928374; }
|
||||
.cm-s-gruvbox-dark span.cm-meta { color: #808000; }
|
||||
|
||||
.cm-s-gruvbox-dark span.cm-comment { color: #928374; }
|
||||
.cm-s-gruvbox-dark span.cm-number, span.cm-atom { color: #d3869b; }
|
||||
.cm-s-gruvbox-dark span.cm-keyword { color: #f84934; }
|
||||
|
||||
.cm-s-gruvbox-dark span.cm-variable { color: #ebdbb2; }
|
||||
.cm-s-gruvbox-dark span.cm-variable-2 { color: #ebdbb2; }
|
||||
.cm-s-gruvbox-dark span.cm-variable-3, .cm-s-gruvbox-dark span.cm-type { color: black; }
|
||||
.cm-s-gruvbox-dark span.cm-operator { color: #ebdbb2; }
|
||||
.cm-s-gruvbox-dark span.cm-def { color: #ebdbb2; }
|
||||
.cm-s-gruvbox-dark span.cm-string { color: #b8bb26; }
|
||||
.cm-s-gruvbox-dark span.cm-string-2 { color: #8ec07c; }
|
||||
.cm-s-gruvbox-dark span.cm-qualifier { color: #555; }
|
||||
.cm-s-gruvbox-dark span.cm-attribute { color: #8ec07c; }
|
||||
|
||||
.cm-s-gruvbox-dark .CodeMirror-activeline-background { background: #3c3836; }
|
||||
.cm-s-gruvbox-dark .CodeMirror-matchingbracket { background: #928374; color:#282828 !important; }
|
||||
|
||||
.cm-s-gruvbox-dark span.cm-builtin { color: #fe8019; }
|
42
vendor/codemirror/theme/idea.css
vendored
Normal file
42
vendor/codemirror/theme/idea.css
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
/**
|
||||
Name: IDEA default theme
|
||||
From IntelliJ IDEA by JetBrains
|
||||
*/
|
||||
|
||||
.cm-s-idea span.cm-meta { color: #808000; }
|
||||
.cm-s-idea span.cm-number { color: #0000FF; }
|
||||
.cm-s-idea span.cm-keyword { line-height: 1em; font-weight: bold; color: #000080; }
|
||||
.cm-s-idea span.cm-atom { font-weight: bold; color: #000080; }
|
||||
.cm-s-idea span.cm-def { color: #000000; }
|
||||
.cm-s-idea span.cm-variable { color: black; }
|
||||
.cm-s-idea span.cm-variable-2 { color: black; }
|
||||
.cm-s-idea span.cm-variable-3, .cm-s-idea span.cm-type { color: black; }
|
||||
.cm-s-idea span.cm-property { color: black; }
|
||||
.cm-s-idea span.cm-operator { color: black; }
|
||||
.cm-s-idea span.cm-comment { color: #808080; }
|
||||
.cm-s-idea span.cm-string { color: #008000; }
|
||||
.cm-s-idea span.cm-string-2 { color: #008000; }
|
||||
.cm-s-idea span.cm-qualifier { color: #555; }
|
||||
.cm-s-idea span.cm-error { color: #FF0000; }
|
||||
.cm-s-idea span.cm-attribute { color: #0000FF; }
|
||||
.cm-s-idea span.cm-tag { color: #000080; }
|
||||
.cm-s-idea span.cm-link { color: #0000FF; }
|
||||
.cm-s-idea .CodeMirror-activeline-background { background: #FFFAE3; }
|
||||
|
||||
.cm-s-idea span.cm-builtin { color: #30a; }
|
||||
.cm-s-idea span.cm-bracket { color: #cc7; }
|
||||
.cm-s-idea { font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;}
|
||||
|
||||
|
||||
.cm-s-idea .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; }
|
||||
|
||||
.CodeMirror-hints.idea {
|
||||
font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
|
||||
color: #616569;
|
||||
background-color: #ebf3fd !important;
|
||||
}
|
||||
|
||||
.CodeMirror-hints.idea .CodeMirror-hint-active {
|
||||
background-color: #a2b8c9 !important;
|
||||
color: #5c6065 !important;
|
||||
}
|
2
vendor/codemirror/theme/lesser-dark.css
vendored
2
vendor/codemirror/theme/lesser-dark.css
vendored
|
@ -38,7 +38,7 @@ Ported to CodeMirror by Peter Kroon
|
|||
.cm-s-lesser-dark span.cm-builtin { color: #ff9e59; }
|
||||
.cm-s-lesser-dark span.cm-bracket { color: #EBEFE7; }
|
||||
.cm-s-lesser-dark span.cm-tag { color: #669199; }
|
||||
.cm-s-lesser-dark span.cm-attribute { color: #00c; }
|
||||
.cm-s-lesser-dark span.cm-attribute { color: #81a4d5; }
|
||||
.cm-s-lesser-dark span.cm-hr { color: #999; }
|
||||
.cm-s-lesser-dark span.cm-link { color: #00c; }
|
||||
.cm-s-lesser-dark span.cm-error { color: #9d1e15; }
|
||||
|
|
37
vendor/codemirror/theme/lucario.css
vendored
Normal file
37
vendor/codemirror/theme/lucario.css
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
Name: lucario
|
||||
Author: Raphael Amorim
|
||||
|
||||
Original Lucario color scheme (https://github.com/raphamorim/lucario)
|
||||
*/
|
||||
|
||||
.cm-s-lucario.CodeMirror, .cm-s-lucario .CodeMirror-gutters {
|
||||
background-color: #2b3e50 !important;
|
||||
color: #f8f8f2 !important;
|
||||
border: none;
|
||||
}
|
||||
.cm-s-lucario .CodeMirror-gutters { color: #2b3e50; }
|
||||
.cm-s-lucario .CodeMirror-cursor { border-left: solid thin #E6C845; }
|
||||
.cm-s-lucario .CodeMirror-linenumber { color: #f8f8f2; }
|
||||
.cm-s-lucario .CodeMirror-selected { background: #243443; }
|
||||
.cm-s-lucario .CodeMirror-line::selection, .cm-s-lucario .CodeMirror-line > span::selection, .cm-s-lucario .CodeMirror-line > span > span::selection { background: #243443; }
|
||||
.cm-s-lucario .CodeMirror-line::-moz-selection, .cm-s-lucario .CodeMirror-line > span::-moz-selection, .cm-s-lucario .CodeMirror-line > span > span::-moz-selection { background: #243443; }
|
||||
.cm-s-lucario span.cm-comment { color: #5c98cd; }
|
||||
.cm-s-lucario span.cm-string, .cm-s-lucario span.cm-string-2 { color: #E6DB74; }
|
||||
.cm-s-lucario span.cm-number { color: #ca94ff; }
|
||||
.cm-s-lucario span.cm-variable { color: #f8f8f2; }
|
||||
.cm-s-lucario span.cm-variable-2 { color: #f8f8f2; }
|
||||
.cm-s-lucario span.cm-def { color: #72C05D; }
|
||||
.cm-s-lucario span.cm-operator { color: #66D9EF; }
|
||||
.cm-s-lucario span.cm-keyword { color: #ff6541; }
|
||||
.cm-s-lucario span.cm-atom { color: #bd93f9; }
|
||||
.cm-s-lucario span.cm-meta { color: #f8f8f2; }
|
||||
.cm-s-lucario span.cm-tag { color: #ff6541; }
|
||||
.cm-s-lucario span.cm-attribute { color: #66D9EF; }
|
||||
.cm-s-lucario span.cm-qualifier { color: #72C05D; }
|
||||
.cm-s-lucario span.cm-property { color: #f8f8f2; }
|
||||
.cm-s-lucario span.cm-builtin { color: #72C05D; }
|
||||
.cm-s-lucario span.cm-variable-3, .cm-s-lucario span.cm-type { color: #ffb86c; }
|
||||
|
||||
.cm-s-lucario .CodeMirror-activeline-background { background: #243443; }
|
||||
.cm-s-lucario .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
|
5
vendor/codemirror/theme/monokai.css
vendored
5
vendor/codemirror/theme/monokai.css
vendored
|
@ -14,6 +14,11 @@
|
|||
.cm-s-monokai span.cm-atom { color: #ae81ff; }
|
||||
.cm-s-monokai span.cm-number { color: #ae81ff; }
|
||||
|
||||
.cm-s-monokai span.cm-comment.cm-attribute { color: #97b757; }
|
||||
.cm-s-monokai span.cm-comment.cm-def { color: #bc9262; }
|
||||
.cm-s-monokai span.cm-comment.cm-tag { color: #bc6283; }
|
||||
.cm-s-monokai span.cm-comment.cm-type { color: #5998a6; }
|
||||
|
||||
.cm-s-monokai span.cm-property, .cm-s-monokai span.cm-attribute { color: #a6e22e; }
|
||||
.cm-s-monokai span.cm-keyword { color: #f92672; }
|
||||
.cm-s-monokai span.cm-builtin { color: #66d9ef; }
|
||||
|
|
16
vendor/codemirror/theme/ssms.css
vendored
Normal file
16
vendor/codemirror/theme/ssms.css
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
.cm-s-ssms span.cm-keyword { color: blue; }
|
||||
.cm-s-ssms span.cm-comment { color: darkgreen; }
|
||||
.cm-s-ssms span.cm-string { color: red; }
|
||||
.cm-s-ssms span.cm-def { color: black; }
|
||||
.cm-s-ssms span.cm-variable { color: black; }
|
||||
.cm-s-ssms span.cm-variable-2 { color: black; }
|
||||
.cm-s-ssms span.cm-atom { color: darkgray; }
|
||||
.cm-s-ssms .CodeMirror-linenumber { color: teal; }
|
||||
.cm-s-ssms .CodeMirror-activeline-background { background: #ffffff; }
|
||||
.cm-s-ssms span.cm-string-2 { color: #FF00FF; }
|
||||
.cm-s-ssms span.cm-operator,
|
||||
.cm-s-ssms span.cm-bracket,
|
||||
.cm-s-ssms span.cm-punctuation { color: darkgray; }
|
||||
.cm-s-ssms .CodeMirror-gutters { border-right: 3px solid #ffee62; background-color: #ffffff; }
|
||||
.cm-s-ssms div.CodeMirror-selected { background: #ADD6FF; }
|
||||
|
10
vendor/jsonlint/README.md
vendored
Normal file
10
vendor/jsonlint/README.md
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
## Jsonlint v1.6.3
|
||||
|
||||
Jsonlint installed via npm - source repo:
|
||||
|
||||
https://github.com/zaach/jsonlint/blob/v1.6.3/lib/jsonlint.js
|
||||
|
||||
If the link doesn't work, it is likely that the npm version and the release versions don't match:
|
||||
|
||||
https://www.npmjs.com/package/jsonlint
|
||||
https://github.com/zaach/jsonlint/releases
|
10
vendor/less/README.md
vendored
Normal file
10
vendor/less/README.md
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
## LESS v3.7.1
|
||||
|
||||
less.js installed via npm - source repo:
|
||||
|
||||
https://github.com/less/less.js/blob/v3.7.1/dist/less.min.js
|
||||
|
||||
If the link doesn't work, it is likely that the npm version and the release versions don't match:
|
||||
|
||||
https://www.npmjs.com/package/less
|
||||
https://github.com/less/less.js/releases
|
14
vendor/less/less.min.js
vendored
14
vendor/less/less.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,23 +1,23 @@
|
|||
http://pieroxy.net/blog/pages/lz-string/index.html
|
||||
|
||||
https://github.com/pieroxy/lz-string/blob/master/LICENSE.txt
|
||||
|
||||
|
||||
Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>
|
||||
This work is free. You can redistribute it and/or modify it
|
||||
under the terms of the WTFPL, Version 2
|
||||
For more information see LICENSE.txt or http://www.wtfpl.net/
|
||||
|
||||
For more information, the home page:
|
||||
http://pieroxy.net/blog/pages/lz-string/testing.html
|
||||
|
||||
LZ-based compression algorithm, version 1.4.4
|
||||
Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>
|
||||
This work is free. You can redistribute it and/or modify it
|
||||
under the terms of the WTFPL, Version 2
|
||||
For more information see LICENSE.txt or http://www.wtfpl.net/
|
||||
|
||||
For more information, the home page:
|
||||
http://pieroxy.net/blog/pages/lz-string/testing.html
|
||||
|
||||
LZ-based compression algorithm, version 1.4.4
|
||||
http://pieroxy.net/blog/pages/lz-string/index.html
|
||||
|
||||
https://github.com/pieroxy/lz-string/blob/master/LICENSE.txt
|
||||
|
||||
|
||||
Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>
|
||||
This work is free. You can redistribute it and/or modify it
|
||||
under the terms of the WTFPL, Version 2
|
||||
For more information see LICENSE.txt or http://www.wtfpl.net/
|
||||
|
||||
For more information, the home page:
|
||||
http://pieroxy.net/blog/pages/lz-string/testing.html
|
||||
|
||||
LZ-based compression algorithm, version 1.4.4
|
||||
Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>
|
||||
This work is free. You can redistribute it and/or modify it
|
||||
under the terms of the WTFPL, Version 2
|
||||
For more information see LICENSE.txt or http://www.wtfpl.net/
|
||||
|
||||
For more information, the home page:
|
||||
http://pieroxy.net/blog/pages/lz-string/testing.html
|
||||
|
||||
LZ-based compression algorithm, version 1.4.4
|
5
vendor/lz-string-unsafe/README.md
vendored
Normal file
5
vendor/lz-string-unsafe/README.md
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
## Lz-string-unsafe v1.4.4-beta
|
||||
|
||||
lz-string-unsafe installed via npm - source repo:
|
||||
|
||||
https://github.com/openstyles/lz-string-unsafe/blob/v1.4.4-beta/lz-string-unsafe.min.js
|
1
vendor/lz-string-unsafe/lz-string-unsafe.min.js
vendored
Normal file
1
vendor/lz-string-unsafe/lz-string-unsafe.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
var LZStringUnsafe=function(){function b(z,A){for(var B=0;A>>=1;B++)r=1&z>>B|r<<1,++s===t&&(s=0,q.push(u(r)),r=0)}function d(z){return x[z]}function e(z){return y[z]}function f(z){return p(z+32)}function g(z,A,B){if(q=[],null!=z){r=0,s=0,t=A,u=B;var C=0,D=0,E=0,F=[3],G=[2,2,F],H=!0,I=0,J=3,K=4;if(z.length){I=z.charCodeAt(0),E=256>I?0:1,b(E,K),b(I,E?65536:256),G[1]=I;nextchar:for(C=1;C<z.length;C++){for(I=z.charCodeAt(C),D=1;D<F.length;D+=2)if(F[D]==I){F=F[D+1];continue nextchar}for(H?H=!1:b(F[0],K),D=1;G[D]!=I&&D<G.length;)D+=2;D==G.length&&(++J>=K&&(K<<=1),E=256>I?0:1,b(E,K),b(I,E?65536:256),G.push(I),G.push([J]),H=!0),F.push(I),F.push([++J]),J>=K&&(K<<=1),F=G[D+1]}for(H?H=!1:b(F[0],K),D=1;G[D]!=I&&D<G.length;)D+=2;D==G.length&&(++J>=K&&(K<<=1),E=256>I?0:1,b(E,K),b(I,E?65536:256)),++J>=K&&(K<<=1)}b(2,K),r<<=t-s,q.push(u(r))}return q}function h(z,A,B){for(var C=[0,1,2],D=4,E=4,F=3,G="",H=[],I="",J=0,K=2,L=0,M="",N=B(0),O=A,P=1;L!=K;)J+=(1&N>>--O)<<L++,0==O&&(O=A,N=B(P++));if(2==J)return"";for(K=8*J+8,J=L=0;L!=K;)J+=(1&N>>--O)<<L++,0==O&&(O=A,N=B(P++));for(M=p(J),C[3]=M,I=M,H.push(M);P<=z;){for(K=F,J=L=0;L!=K;)J+=(1&N>>--O)<<L++,0==O&&(O=A,N=B(P++));if(2>J){for(K=8+8*J,J=L=0;L!=K;)J+=(1&N>>--O)<<L++,0==O&&(O=A,N=B(P++));C[E]=p(J),J=E++,0==--D&&(D=1<<F++)}else if(2==J)return H.join("");if(J>C.length)return null;G=J<C.length?C[J]:I+I.charAt(0),H.push(G),C[E++]=I+G.charAt(0),I=G,0==--D&&(D=1<<F++)}return""}function l(z){return g(z,16,p)}function m(z){return null==z?"":0==z.length?null:h(z.length,16,function(A){return z[A].charCodeAt(0)})}for(var q,r,s,t,u,n=0,o={},p=String.fromCharCode,v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+",x=(v+"/=").split(""),y=(v+"-$").split("");65>n;)62<n&&(o[y[n].charCodeAt(0)]=n),o[x[n].charCodeAt(0)]=n++;return{compressToBase64:function(z){if(null==z)return"";for(var A=g(z,6,d),B=A.length%4;B--;)A.push("=");return A.join("")},decompressFromBase64:function(z){return null==z?"":""==z?null:h(z.length,6,function(A){return o[z.charCodeAt(A)]})},compressToUTF16:function(z){if(null==z)return"";var A=g(z,15,f);return A.push(" "),A.join("")},decompressFromUTF16:function(z){return null==z?"":""==z?null:h(z.length,15,function(A){return z.charCodeAt(A)-32})},compressToUint8Array:function(z){for(var E,A=l(z),B=new Uint8Array(2*A.length),C=0,D=A.length;C<D;C++)E=A[C].charCodeAt(0),B[2*C]=E>>>8,B[2*C+1]=255&E;return B},decompressFromUint8Array:function(z){if(null===z||z===void 0)return m(z);return 0==z.length?null:h(z.length,8,function(A){return z[A]})},compressToEncodedURIComponent:function(z){return null==z?"":g(z,6,e).join("")},decompressFromEncodedURIComponent:function(z){return null==z?"":""==z?null:(z=z.replace(/ /g,"+"),h(z.length,6,function(A){return o[z.charCodeAt(A)]}))},compress:function(z){return l(z).join("")},compressToArray:l,decompress:function(z){return null==z?"":""==z?null:h(z.length,16,function(A){return z.charCodeAt(A)})},decompressFromArray:m}}();"function"==typeof define&&define.amd?define(function(){return LZStringUnsafe}):"undefined"!=typeof module&&null!=module?module.exports=LZStringUnsafe:"undefined"!=typeof angular&&null!=angular&&angular.module("LZStringUnsafe",[]).factory("LZStringUnsafe",function(){return LZStringUnsafe});
|
449
vendor/lz-string/lz-string-unsafe.js
vendored
449
vendor/lz-string/lz-string-unsafe.js
vendored
|
@ -1,449 +0,0 @@
|
|||
|
||||
var LZStringUnsafe = (
|
||||
function () {
|
||||
|
||||
// private property
|
||||
var f = String.fromCharCode,
|
||||
Base64CharArray = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(''),
|
||||
UriSafeCharArray = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$".split(''),
|
||||
Base64ReverseDic = {},
|
||||
UriSafeReverseDic = {},
|
||||
i = 65;
|
||||
while (i--) {
|
||||
Base64ReverseDic[Base64CharArray[i].charCodeAt(0)] = i;
|
||||
UriSafeReverseDic[UriSafeCharArray[i].charCodeAt(0)] = i;
|
||||
}
|
||||
var getChar16Bits = function (a) { return f(a); },
|
||||
getCharFromBase64 = function (a) { return Base64CharArray[a]; },
|
||||
getCharFromURISafe = function (a) { return UriSafeCharArray[a]; },
|
||||
getCharFromUTF16 = function (a) { return f(a + 32); };
|
||||
|
||||
var LZString = {
|
||||
compressToBase64: function (input) {
|
||||
if (input == null) return "";
|
||||
var res = LZString._compressToArray(input, 6, getCharFromBase64);
|
||||
// To produce valid Base64
|
||||
var i = res.length % 4;
|
||||
while (i--) {
|
||||
res.push("=");
|
||||
}
|
||||
|
||||
return res.join('');
|
||||
},
|
||||
|
||||
decompressFromBase64: function (input) {
|
||||
if (input == null) return "";
|
||||
if (input == "") return null;
|
||||
return LZString._decompress(input.length, 6, function (index) { return Base64ReverseDic[input.charCodeAt(index)]; });
|
||||
},
|
||||
|
||||
compressToUTF16: function (input) {
|
||||
if (input == null) return "";
|
||||
var compressed = LZString._compressToArray(input, 15, getCharFromUTF16);
|
||||
compressed.push(" ");
|
||||
return compressed.join('');
|
||||
},
|
||||
|
||||
decompressFromUTF16: function (compressed) {
|
||||
if (compressed == null) return "";
|
||||
if (compressed == "") return null;
|
||||
return LZString._decompress(compressed.length, 15, function (index) { return compressed.charCodeAt(index) - 32; });
|
||||
},
|
||||
|
||||
//compress into uint8array (UCS-2 big endian format)
|
||||
compressToUint8Array: function (uncompressed) {
|
||||
var compressed = LZString.compressToArray(uncompressed);
|
||||
var buf = new Uint8Array(compressed.length * 2); // 2 bytes per character
|
||||
|
||||
for (var i = 0, TotalLen = compressed.length; i < TotalLen; i++) {
|
||||
var current_value = compressed[i].charCodeAt(0);
|
||||
buf[i * 2] = current_value >>> 8;
|
||||
buf[i * 2 + 1] = current_value & 0xFF;
|
||||
}
|
||||
return buf;
|
||||
},
|
||||
|
||||
//decompress from uint8array (UCS-2 big endian format)
|
||||
decompressFromUint8Array: function (compressed) {
|
||||
if (compressed === null || compressed === undefined) {
|
||||
return LZString.decompressFromArray(compressed);
|
||||
} else if (compressed.length == 0) {
|
||||
return null;
|
||||
}
|
||||
return LZString._decompress(compressed.length, 8, function (index) { return compressed[index]; });
|
||||
},
|
||||
|
||||
|
||||
//compress into a string that is already URI encoded
|
||||
compressToEncodedURIComponent: function (input) {
|
||||
if (input == null) return "";
|
||||
return LZString._compressToArray(input, 6, getCharFromURISafe).join('');
|
||||
},
|
||||
|
||||
//decompress from an output of compressToEncodedURIComponent
|
||||
decompressFromEncodedURIComponent: function (input) {
|
||||
if (input == null) return "";
|
||||
if (input == "") return null;
|
||||
input = input.replace(/ /g, "+");
|
||||
return LZString._decompress(input.length, 6, function (index) { return UriSafeReverseDic[input.charCodeAt(index)]; });
|
||||
},
|
||||
|
||||
compress: function (uncompressed) {
|
||||
return LZString.compressToArray(uncompressed).join('');
|
||||
},
|
||||
compressToArray: function (uncompressed) {
|
||||
return LZString._compressToArray(uncompressed, 16, getChar16Bits);
|
||||
},
|
||||
_compressToArray: function (uncompressed, bitsPerChar, getCharFromInt) {
|
||||
if (uncompressed == null) return [];
|
||||
var i = 0, j = 0, k = 0, value = 0,
|
||||
node = [3], // first node will always be initialised like this.
|
||||
// we should never output the root anyway,
|
||||
// so we initiate with terminating token
|
||||
// Also, dictionary[1] will be overwritten
|
||||
// by the firs charCode
|
||||
dictionary = [2, 2, node],
|
||||
freshNode = true,
|
||||
c = 0,
|
||||
nextNode,
|
||||
enlargeIn = 1,
|
||||
dictSize = 4,
|
||||
numBits = 2,
|
||||
data = [],
|
||||
data_val = 0,
|
||||
data_position = 0;
|
||||
|
||||
if (uncompressed.length) {
|
||||
// If there is a string, the first charCode is guaranteed to
|
||||
// be new, so we write it to output stream, and add it to the
|
||||
// dictionary. For the same reason we can initialize freshNode
|
||||
// as true, and new_node, node and dictSize as if
|
||||
// it was already added to the dictionary (see above).
|
||||
|
||||
c = uncompressed.charCodeAt(0);
|
||||
|
||||
// == Write first charCode token to output ==
|
||||
|
||||
// 8 or 16 bit?
|
||||
value = c < 256 ? 0 : 1
|
||||
|
||||
// insert "new 8/16 bit charCode" token
|
||||
// into bitstream (value 1)
|
||||
for (i = 0; i < numBits; i++) {
|
||||
// Value is 0 (8 bit) or 1 (16 bit).
|
||||
// We shift it into the bitstream in reverse
|
||||
// (shifting has precedence over bitmasking)
|
||||
data_val = value >> i | data_val << 1;
|
||||
if (++data_position == bitsPerChar) {
|
||||
data_position = 0;
|
||||
data.push(getCharFromInt(data_val));
|
||||
data_val = 0;
|
||||
}
|
||||
}
|
||||
// insert charCode bits into bitstream
|
||||
// Nasty but effective hack:
|
||||
// loop 8 or 16 times based on token value
|
||||
value = 8 + 8 * value;
|
||||
for (i = 0; i < value; i++) {
|
||||
// shifting has precedence over bitmasking
|
||||
data_val = c >> i & 1 | data_val << 1;
|
||||
if (++data_position == bitsPerChar) {
|
||||
data_position = 0;
|
||||
data.push(getCharFromInt(data_val));
|
||||
data_val = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Add charCode to the dictionary.
|
||||
dictionary[1] = c;
|
||||
|
||||
nextchar:
|
||||
for (j = 1; j < uncompressed.length; j++) {
|
||||
c = uncompressed.charCodeAt(j);
|
||||
// does the new charCode match an existing prefix?
|
||||
for (k = 1; k < node.length; k += 2) {
|
||||
if (node[k] == c) {
|
||||
node = node[k + 1];
|
||||
continue nextchar;
|
||||
}
|
||||
}
|
||||
// we only end up here if there is no matching char
|
||||
|
||||
// Prefix+charCode does not exist in trie yet.
|
||||
// We write the prefix to the bitstream, and add
|
||||
// the new charCode to the dictionary if it's new
|
||||
// Then we set `node` to the root node matching
|
||||
// the charCode.
|
||||
|
||||
if (freshNode) {
|
||||
// Prefix is a freshly added character token,
|
||||
// which was already written to the bitstream
|
||||
freshNode = false;
|
||||
} else {
|
||||
// write out the current prefix token
|
||||
value = node[0];
|
||||
for (i = 0; i < numBits; i++) {
|
||||
// shifting has precedence over bitmasking
|
||||
data_val = value >> i & 1 | data_val << 1;
|
||||
if (++data_position == bitsPerChar) {
|
||||
data_position = 0;
|
||||
data.push(getCharFromInt(data_val));
|
||||
data_val = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Is the new charCode a new character
|
||||
// that needs to be stored at the root?
|
||||
k = 1;
|
||||
while (dictionary[k] != c && k < dictionary.length) {
|
||||
k += 2;
|
||||
}
|
||||
if (k == dictionary.length) {
|
||||
// increase token bitlength if necessary
|
||||
if (--enlargeIn == 0) {
|
||||
enlargeIn = 1 << numBits++;
|
||||
}
|
||||
|
||||
// insert "new 8/16 bit charCode" token,
|
||||
// see comments above for explanation
|
||||
value = c < 256 ? 0 : 1
|
||||
for (i = 0; i < numBits; i++) {
|
||||
data_val = value >> i | data_val << 1;
|
||||
if (++data_position == bitsPerChar) {
|
||||
data_position = 0;
|
||||
data.push(getCharFromInt(data_val));
|
||||
data_val = 0;
|
||||
}
|
||||
}
|
||||
value = 8 + 8 * value;
|
||||
for (i = 0; i < value; i++) {
|
||||
data_val = c >> i & 1 | data_val << 1;
|
||||
if (++data_position == bitsPerChar) {
|
||||
data_position = 0;
|
||||
data.push(getCharFromInt(data_val));
|
||||
data_val = 0;
|
||||
}
|
||||
}
|
||||
dictionary.push(c);
|
||||
dictionary.push([dictSize++]);
|
||||
// Note of that we already wrote
|
||||
// the charCode token to the bitstream
|
||||
freshNode = true;
|
||||
}
|
||||
// add node representing prefix + new charCode to trie
|
||||
node.push(c);
|
||||
node.push([dictSize++]);
|
||||
// increase token bitlength if necessary
|
||||
if (--enlargeIn == 0) {
|
||||
enlargeIn = 1 << numBits++;
|
||||
}
|
||||
// set node to first charCode of new prefix
|
||||
// k is guaranteed to be at the current charCode,
|
||||
// since we either broke out of the while loop
|
||||
// when it matched, or just added the new charCode
|
||||
node = dictionary[k + 1];
|
||||
|
||||
}
|
||||
|
||||
// === Write last prefix to output ===
|
||||
if (freshNode) {
|
||||
// character token already written to output
|
||||
freshNode = false;
|
||||
} else {
|
||||
// write out the prefix token
|
||||
value = node[0];
|
||||
for (i = 0; i < numBits; i++) {
|
||||
// shifting has precedence over bitmasking
|
||||
data_val = value >> i & 1 | data_val << 1;
|
||||
if (++data_position == bitsPerChar) {
|
||||
data_position = 0;
|
||||
data.push(getCharFromInt(data_val));
|
||||
data_val = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Is c a new character?
|
||||
k = 1;
|
||||
while (dictionary[k] != c && k < dictionary.length) {
|
||||
k += 2;
|
||||
}
|
||||
if (k == dictionary.length) {
|
||||
// increase token bitlength if necessary
|
||||
if (--enlargeIn == 0) {
|
||||
enlargeIn = 1 << numBits++;
|
||||
}
|
||||
// insert "new 8/16 bit charCode" token,
|
||||
// see comments above for explanation
|
||||
value = c < 256 ? 0 : 1
|
||||
for (i = 0; i < numBits; i++) {
|
||||
data_val = value >> i | data_val << 1;
|
||||
if (++data_position == bitsPerChar) {
|
||||
data_position = 0;
|
||||
data.push(getCharFromInt(data_val));
|
||||
data_val = 0;
|
||||
}
|
||||
}
|
||||
value = 8 + 8 * value;
|
||||
for (i = 0; i < value; i++) {
|
||||
data_val = c >> i & 1 | data_val << 1;
|
||||
if (++data_position == bitsPerChar) {
|
||||
data_position = 0;
|
||||
data.push(getCharFromInt(data_val));
|
||||
data_val = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
// increase token bitlength if necessary
|
||||
if (--enlargeIn == 0) {
|
||||
enlargeIn = 1 << numBits++;
|
||||
}
|
||||
}
|
||||
|
||||
// Mark the end of the stream
|
||||
for (i = 0; i < numBits; i++) {
|
||||
// shifting has precedence over bitmasking
|
||||
data_val = 2 >> i & 1 | data_val << 1;
|
||||
if (++data_position == bitsPerChar) {
|
||||
data_position = 0;
|
||||
data.push(getCharFromInt(data_val));
|
||||
data_val = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Flush the last char
|
||||
data_val <<= bitsPerChar - data_position;
|
||||
data.push(getCharFromInt(data_val));
|
||||
return data;
|
||||
},
|
||||
|
||||
decompress: function (compressed) {
|
||||
if (compressed == null) return "";
|
||||
if (compressed == "") return null;
|
||||
return LZString._decompress(compressed.length, 16, function (index) { return compressed.charCodeAt(index); });
|
||||
},
|
||||
|
||||
decompressFromArray: function (compressed) {
|
||||
if (compressed == null) return "";
|
||||
if (compressed.length == 0) return null;
|
||||
return LZString._decompress(compressed.length, 16, function (index) { return compressed[index].charCodeAt(0); });
|
||||
},
|
||||
|
||||
_decompress: function (length, resetBits, getNextValue) {
|
||||
var dictionary = [0, 1, 2],
|
||||
enlargeIn = 4,
|
||||
dictSize = 4,
|
||||
numBits = 3,
|
||||
entry = "",
|
||||
result = [],
|
||||
w = "",
|
||||
bits = 0,
|
||||
maxpower = 2,
|
||||
power = 0,
|
||||
c = "",
|
||||
data_val = getNextValue(0),
|
||||
data_position = resetBits,
|
||||
data_index = 1;
|
||||
|
||||
// Get first token, guaranteed to be either
|
||||
// a new character token (8 or 16 bits)
|
||||
// or end of stream token.
|
||||
while (power != maxpower) {
|
||||
// shifting has precedence over bitmasking
|
||||
bits += (data_val >> --data_position & 1) << power++;
|
||||
if (data_position == 0) {
|
||||
data_position = resetBits;
|
||||
data_val = getNextValue(data_index++);
|
||||
}
|
||||
}
|
||||
|
||||
// if end of stream token, return empty string
|
||||
if (bits == 2) {
|
||||
return "";
|
||||
}
|
||||
|
||||
// else, get character
|
||||
maxpower = bits * 8 + 8;
|
||||
bits = power = 0;
|
||||
while (power != maxpower) {
|
||||
// shifting has precedence over bitmasking
|
||||
bits += (data_val >> --data_position & 1) << power++;
|
||||
if (data_position == 0) {
|
||||
data_position = resetBits;
|
||||
data_val = getNextValue(data_index++);
|
||||
}
|
||||
}
|
||||
c = f(bits);
|
||||
dictionary[3] = c;
|
||||
w = c;
|
||||
result.push(c);
|
||||
|
||||
// read rest of string
|
||||
while (data_index <= length) {
|
||||
// read out next token
|
||||
maxpower = numBits;
|
||||
bits = power = 0;
|
||||
while (power != maxpower) {
|
||||
// shifting has precedence over bitmasking
|
||||
bits += (data_val >> --data_position & 1) << power++;
|
||||
if (data_position == 0) {
|
||||
data_position = resetBits;
|
||||
data_val = getNextValue(data_index++);
|
||||
}
|
||||
}
|
||||
|
||||
// 0 or 1 implies new character token
|
||||
if (bits < 2) {
|
||||
maxpower = (8 + 8 * bits);
|
||||
bits = power = 0;
|
||||
while (power != maxpower) {
|
||||
// shifting has precedence over bitmasking
|
||||
bits += (data_val >> --data_position & 1) << power++;
|
||||
if (data_position == 0) {
|
||||
data_position = resetBits;
|
||||
data_val = getNextValue(data_index++);
|
||||
}
|
||||
}
|
||||
dictionary[dictSize] = f(bits);
|
||||
bits = dictSize++;
|
||||
if (--enlargeIn == 0) {
|
||||
enlargeIn = 1 << numBits++;
|
||||
}
|
||||
} else if (bits == 2) {
|
||||
// end of stream token
|
||||
return result.join('');
|
||||
}
|
||||
|
||||
if (bits > dictionary.length) {
|
||||
return null;
|
||||
}
|
||||
entry = bits < dictionary.length ? dictionary[bits] : w + w.charAt(0);
|
||||
result.push(entry);
|
||||
// Add w+entry[0] to the dictionary.
|
||||
dictionary[dictSize++] = w + entry.charAt(0);
|
||||
|
||||
w = entry;
|
||||
|
||||
if (--enlargeIn == 0) {
|
||||
enlargeIn = 1 << numBits++;
|
||||
}
|
||||
|
||||
}
|
||||
return "";
|
||||
}
|
||||
};
|
||||
return LZString;
|
||||
}
|
||||
)();
|
||||
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(function () { return LZStringUnsafe; });
|
||||
} else if (typeof module !== 'undefined' && module != null) {
|
||||
module.exports = LZStringUnsafe
|
||||
} else if (typeof angular !== 'undefined' && angular != null) {
|
||||
angular.module('LZStringUnsafe', [])
|
||||
.factory('LZStringUnsafe', function () {
|
||||
return LZStringUnsafe;
|
||||
});
|
||||
}
|
1
vendor/node-semver/README.md
vendored
1
vendor/node-semver/README.md
vendored
|
@ -1 +0,0 @@
|
|||
See https://github.com/eight04/node-semver-bundle.
|
1
vendor/node-semver/semver.js
vendored
1
vendor/node-semver/semver.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,20 +1,20 @@
|
|||
https://github.com/eight04/node-semver-bundle
|
||||
|
||||
https://github.com/eight04/node-semver-bundle/blob/master/LICENSE
|
||||
|
||||
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
https://github.com/openstyles/semver-bundle
|
||||
|
||||
https://github.com/openstyles/semver-bundle/blob/master/LICENSE
|
||||
|
||||
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
5
vendor/semver-bundle/README.md
vendored
Normal file
5
vendor/semver-bundle/README.md
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
## Semver-bundle v0.1.0
|
||||
|
||||
semver-bundle installed via npm - source repo:
|
||||
|
||||
https://github.com/openstyles/semver-bundle/blob/v0.1.0/dist/semver.js
|
1
vendor/semver-bundle/semver.js
vendored
Normal file
1
vendor/semver-bundle/semver.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
var semverCompare=function(){"use strict";var s=256,i=Number.MAX_SAFE_INTEGER||9007199254740991,a=[],e=[],r=0,t=r++;e[t]="0|[1-9]\\d*";var n=r++;e[n]="[0-9]+";var h=r++;e[h]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var o=r++;e[o]="("+e[t]+")\\.("+e[t]+")\\.("+e[t]+")";var p=r++;e[p]="("+e[n]+")\\.("+e[n]+")\\.("+e[n]+")";var l=r++;e[l]="(?:"+e[t]+"|"+e[h]+")";var c=r++;e[c]="(?:"+e[n]+"|"+e[h]+")";var v=r++;e[v]="(?:-("+e[l]+"(?:\\."+e[l]+")*))";var f=r++;e[f]="(?:-?("+e[c]+"(?:\\."+e[c]+")*))";var m=r++;e[m]="[0-9A-Za-z-]+";var u=r++;e[u]="(?:\\+("+e[m]+"(?:\\."+e[m]+")*))";var g=r++,w="v?"+e[o]+e[v]+"?"+e[u]+"?";e[g]="^"+w+"$";var d="[v=\\s]*"+e[p]+e[f]+"?"+e[u]+"?",$=r++;e[$]="^"+d+"$";var y=r++;e[y]="((?:<|>)?=?)";var E=r++;e[E]=e[n]+"|x|X|\\*";var j=r++;e[j]=e[t]+"|x|X|\\*";var b=r++;e[b]="[v=\\s]*("+e[j]+")(?:\\.("+e[j]+")(?:\\.("+e[j]+")(?:"+e[v]+")?"+e[u]+"?)?)?";var k=r++;e[k]="[v=\\s]*("+e[E]+")(?:\\.("+e[E]+")(?:\\.("+e[E]+")(?:"+e[f]+")?"+e[u]+"?)?)?",e[r++]="^"+e[y]+"\\s*"+e[b]+"$",e[r++]="^"+e[y]+"\\s*"+e[k]+"$",e[r++]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var T=r++;e[T]="(?:~>?)";var x=r++;e[x]="(\\s*)"+e[T]+"\\s+",a[x]=new RegExp(e[x],"g"),e[r++]="^"+e[T]+e[b]+"$",e[r++]="^"+e[T]+e[k]+"$";var I=r++;e[I]="(?:\\^)";var A=r++;e[A]="(\\s*)"+e[I]+"\\s+",a[A]=new RegExp(e[A],"g"),e[r++]="^"+e[I]+e[b]+"$",e[r++]="^"+e[I]+e[k]+"$",e[r++]="^"+e[y]+"\\s*("+d+")$|^$",e[r++]="^"+e[y]+"\\s*("+w+")$|^$";var R=r++;e[R]="(\\s*)"+e[y]+"\\s*("+d+"|"+e[b]+")",a[R]=new RegExp(e[R],"g"),e[r++]="^\\s*("+e[b]+")\\s+-\\s+("+e[b]+")\\s*$",e[r++]="^\\s*("+e[k]+")\\s+-\\s+("+e[k]+")\\s*$",e[r++]="(<|>)?=?\\s*\\*";for(var N=0;N<35;N++)a[N]||(a[N]=new RegExp(e[N]));function z(e,r){if(e instanceof z){if(e.loose===r)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>s)throw new TypeError("version is longer than "+s+" characters");if(!(this instanceof z))return new z(e,r);this.loose=r;var t=e.trim().match(r?a[$]:a[g]);if(!t)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+t[1],this.minor=+t[2],this.patch=+t[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");t[4]?this.prerelease=t[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var r=+e;if(0<=r&&r<i)return r}return e}):this.prerelease=[],this.build=t[5]?t[5].split("."):[],this.format()}z.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},z.prototype.toString=function(){return this.version},z.prototype.compare=function(e){return e instanceof z||(e=new z(e,this.loose)),this.compareMain(e)||this.comparePre(e)},z.prototype.compareMain=function(e){return e instanceof z||(e=new z(e,this.loose)),X(this.major,e.major)||X(this.minor,e.minor)||X(this.patch,e.patch)},z.prototype.comparePre=function(e){if(e instanceof z||(e=new z(e,this.loose)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var r=0;do{var t=this.prerelease[r],s=e.prerelease[r];if(void 0===t&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===t)return-1;if(t!==s)return X(t,s)}while(++r)},z.prototype.inc=function(e,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r),this.inc("pre",r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",r),this.inc("pre",r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var t=this.prerelease.length;0<=--t;)"number"==typeof this.prerelease[t]&&(this.prerelease[t]++,t=-2);-1===t&&this.prerelease.push(0)}r&&(this.prerelease[0]===r?isNaN(this.prerelease[1])&&(this.prerelease=[r,0]):this.prerelease=[r,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this};var M=/^[0-9]+$/;function X(e,r){var t=M.test(e),s=M.test(r);return t&&s&&(e=+e,r=+r),t&&!s?-1:s&&!t?1:e<r?-1:r<e?1:0}return function(e,r,t){return new z(e,t).compare(new z(r,t))}}();
|
5
vendor/stylelint-bundle/README.md
vendored
Normal file
5
vendor/stylelint-bundle/README.md
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
## Stylelint-bundle v8.0.0
|
||||
|
||||
stylelint-bundle installed via npm - source repo:
|
||||
|
||||
https://github.com/openstyles/stylelint-bundle/blob/v8.0.0/stylelint-bundle.min.js
|
|
@ -1,28 +1,29 @@
|
|||
http://stylus-lang.com/
|
||||
https://github.com/stylus/stylus/
|
||||
|
||||
https://github.com/stylus/stylus/blob/dev/LICENSE
|
||||
|
||||
|
||||
The MIT License
|
||||
|
||||
Copyright (c) Automattic <developer.wordpress.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
http://stylus-lang.com/
|
||||
https://github.com/stylus/stylus/
|
||||
https://github.com/openstyles/stylus-lang-bundle
|
||||
|
||||
https://github.com/openstyles/stylus-lang-bundle/blob/master/LICENSE
|
||||
|
||||
|
||||
The MIT License
|
||||
|
||||
Copyright (c) Automattic <developer.wordpress.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
5
vendor/stylus-lang-bundle/README.md
vendored
Normal file
5
vendor/stylus-lang-bundle/README.md
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
## Stylus-lang-bundle v0.54.5
|
||||
|
||||
stylus-lang-bundle installed via npm - source repo:
|
||||
|
||||
https://github.com/openstyles/stylus-lang-bundle/blob/v0.54.5/stylus.min.js
|
Loading…
Reference in New Issue
Block a user