mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-05-05 12:22:35 +02:00
Add decaf webui
This commit is contained in:
parent
6b4c9bb531
commit
69c0388954
742 changed files with 608981 additions and 6 deletions
64
webui/node_modules/sourcemap-codec/CHANGELOG.md
generated
vendored
Normal file
64
webui/node_modules/sourcemap-codec/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,64 @@
|
|||
# sourcemap-codec changelog
|
||||
|
||||
## 1.4.8
|
||||
|
||||
* Performance boost ([#80](https://github.com/Rich-Harris/sourcemap-codec/pull/80))
|
||||
|
||||
## 1.4.7
|
||||
|
||||
* Include .map files in package ([#73](https://github.com/Rich-Harris/sourcemap-codec/issues/73))
|
||||
|
||||
## 1.4.6
|
||||
|
||||
* Use arrays instead of typed arrays ([#79](https://github.com/Rich-Harris/sourcemap-codec/pull/79))
|
||||
|
||||
## 1.4.5
|
||||
|
||||
* Handle overflow cases ([#78](https://github.com/Rich-Harris/sourcemap-codec/pull/78))
|
||||
|
||||
## 1.4.4
|
||||
|
||||
* Use Uint32Array, yikes ([#77](https://github.com/Rich-Harris/sourcemap-codec/pull/77))
|
||||
|
||||
## 1.4.3
|
||||
|
||||
* Use Uint16Array to prevent overflow ([#75](https://github.com/Rich-Harris/sourcemap-codec/pull/75))
|
||||
|
||||
## 1.4.2
|
||||
|
||||
* GO EVEN FASTER ([#74](https://github.com/Rich-Harris/sourcemap-codec/pull/74))
|
||||
|
||||
## 1.4.1
|
||||
|
||||
* GO FASTER ([#71](https://github.com/Rich-Harris/sourcemap-codec/pull/71))
|
||||
|
||||
## 1.4.0
|
||||
|
||||
* Add TypeScript declarations ([#70](https://github.com/Rich-Harris/sourcemap-codec/pull/70))
|
||||
|
||||
## 1.3.1
|
||||
|
||||
* Update build process, expose `pkg.module`
|
||||
|
||||
## 1.3.0
|
||||
|
||||
* Update build process
|
||||
|
||||
## 1.2.1
|
||||
|
||||
* Add dist files to npm package
|
||||
|
||||
## 1.2.0
|
||||
|
||||
* Add ES6 build
|
||||
* Update dependencies
|
||||
* Add test coverage
|
||||
|
||||
## 1.1.0
|
||||
|
||||
* Fix bug with lines containing single-character segments
|
||||
* Add tests
|
||||
|
||||
## 1.0.0
|
||||
|
||||
* First release
|
21
webui/node_modules/sourcemap-codec/LICENSE
generated
vendored
Normal file
21
webui/node_modules/sourcemap-codec/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License
|
||||
|
||||
Copyright (c) 2015 Rich Harris
|
||||
|
||||
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.
|
63
webui/node_modules/sourcemap-codec/README.md
generated
vendored
Normal file
63
webui/node_modules/sourcemap-codec/README.md
generated
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
# sourcemap-codec
|
||||
|
||||
Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit).
|
||||
|
||||
|
||||
## Why?
|
||||
|
||||
Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap.
|
||||
|
||||
This package makes the process slightly easier.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
npm install sourcemap-codec
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import { encode, decode } from 'sourcemap-codec';
|
||||
|
||||
var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
|
||||
|
||||
assert.deepEqual( decoded, [
|
||||
// the first line (of the generated code) has no mappings,
|
||||
// as shown by the starting semi-colon (which separates lines)
|
||||
[],
|
||||
|
||||
// the second line contains four (comma-separated) segments
|
||||
[
|
||||
// segments are encoded as you'd expect:
|
||||
// [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ]
|
||||
|
||||
// i.e. the first segment begins at column 2, and maps back to the second column
|
||||
// of the second line (both zero-based) of the 0th source, and uses the 0th
|
||||
// name in the `map.names` array
|
||||
[ 2, 0, 2, 2, 0 ],
|
||||
|
||||
// the remaining segments are 4-length rather than 5-length,
|
||||
// because they don't map a name
|
||||
[ 4, 0, 2, 4 ],
|
||||
[ 6, 0, 2, 5 ],
|
||||
[ 7, 0, 2, 7 ]
|
||||
],
|
||||
|
||||
// the final line contains two segments
|
||||
[
|
||||
[ 2, 1, 10, 19 ],
|
||||
[ 12, 1, 11, 20 ]
|
||||
]
|
||||
]);
|
||||
|
||||
var encoded = encode( decoded );
|
||||
assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
|
||||
```
|
||||
|
||||
|
||||
# License
|
||||
|
||||
MIT
|
124
webui/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js
generated
vendored
Normal file
124
webui/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js
generated
vendored
Normal file
|
@ -0,0 +1,124 @@
|
|||
var charToInteger = {};
|
||||
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
||||
for (var i = 0; i < chars.length; i++) {
|
||||
charToInteger[chars.charCodeAt(i)] = i;
|
||||
}
|
||||
function decode(mappings) {
|
||||
var decoded = [];
|
||||
var line = [];
|
||||
var segment = [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
];
|
||||
var j = 0;
|
||||
for (var i = 0, shift = 0, value = 0; i < mappings.length; i++) {
|
||||
var c = mappings.charCodeAt(i);
|
||||
if (c === 44) { // ","
|
||||
segmentify(line, segment, j);
|
||||
j = 0;
|
||||
}
|
||||
else if (c === 59) { // ";"
|
||||
segmentify(line, segment, j);
|
||||
j = 0;
|
||||
decoded.push(line);
|
||||
line = [];
|
||||
segment[0] = 0;
|
||||
}
|
||||
else {
|
||||
var integer = charToInteger[c];
|
||||
if (integer === undefined) {
|
||||
throw new Error('Invalid character (' + String.fromCharCode(c) + ')');
|
||||
}
|
||||
var hasContinuationBit = integer & 32;
|
||||
integer &= 31;
|
||||
value += integer << shift;
|
||||
if (hasContinuationBit) {
|
||||
shift += 5;
|
||||
}
|
||||
else {
|
||||
var shouldNegate = value & 1;
|
||||
value >>>= 1;
|
||||
if (shouldNegate) {
|
||||
value = value === 0 ? -0x80000000 : -value;
|
||||
}
|
||||
segment[j] += value;
|
||||
j++;
|
||||
value = shift = 0; // reset
|
||||
}
|
||||
}
|
||||
}
|
||||
segmentify(line, segment, j);
|
||||
decoded.push(line);
|
||||
return decoded;
|
||||
}
|
||||
function segmentify(line, segment, j) {
|
||||
// This looks ugly, but we're creating specialized arrays with a specific
|
||||
// length. This is much faster than creating a new array (which v8 expands to
|
||||
// a capacity of 17 after pushing the first item), or slicing out a subarray
|
||||
// (which is slow). Length 4 is assumed to be the most frequent, followed by
|
||||
// length 5 (since not everything will have an associated name), followed by
|
||||
// length 1 (it's probably rare for a source substring to not have an
|
||||
// associated segment data).
|
||||
if (j === 4)
|
||||
line.push([segment[0], segment[1], segment[2], segment[3]]);
|
||||
else if (j === 5)
|
||||
line.push([segment[0], segment[1], segment[2], segment[3], segment[4]]);
|
||||
else if (j === 1)
|
||||
line.push([segment[0]]);
|
||||
}
|
||||
function encode(decoded) {
|
||||
var sourceFileIndex = 0; // second field
|
||||
var sourceCodeLine = 0; // third field
|
||||
var sourceCodeColumn = 0; // fourth field
|
||||
var nameIndex = 0; // fifth field
|
||||
var mappings = '';
|
||||
for (var i = 0; i < decoded.length; i++) {
|
||||
var line = decoded[i];
|
||||
if (i > 0)
|
||||
mappings += ';';
|
||||
if (line.length === 0)
|
||||
continue;
|
||||
var generatedCodeColumn = 0; // first field
|
||||
var lineMappings = [];
|
||||
for (var _i = 0, line_1 = line; _i < line_1.length; _i++) {
|
||||
var segment = line_1[_i];
|
||||
var segmentMappings = encodeInteger(segment[0] - generatedCodeColumn);
|
||||
generatedCodeColumn = segment[0];
|
||||
if (segment.length > 1) {
|
||||
segmentMappings +=
|
||||
encodeInteger(segment[1] - sourceFileIndex) +
|
||||
encodeInteger(segment[2] - sourceCodeLine) +
|
||||
encodeInteger(segment[3] - sourceCodeColumn);
|
||||
sourceFileIndex = segment[1];
|
||||
sourceCodeLine = segment[2];
|
||||
sourceCodeColumn = segment[3];
|
||||
}
|
||||
if (segment.length === 5) {
|
||||
segmentMappings += encodeInteger(segment[4] - nameIndex);
|
||||
nameIndex = segment[4];
|
||||
}
|
||||
lineMappings.push(segmentMappings);
|
||||
}
|
||||
mappings += lineMappings.join(',');
|
||||
}
|
||||
return mappings;
|
||||
}
|
||||
function encodeInteger(num) {
|
||||
var result = '';
|
||||
num = num < 0 ? (-num << 1) | 1 : num << 1;
|
||||
do {
|
||||
var clamped = num & 31;
|
||||
num >>>= 5;
|
||||
if (num > 0) {
|
||||
clamped |= 32;
|
||||
}
|
||||
result += chars[clamped];
|
||||
} while (num > 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
export { decode, encode };
|
||||
//# sourceMappingURL=sourcemap-codec.es.js.map
|
1
webui/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js.map
generated
vendored
Normal file
1
webui/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
135
webui/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js
generated
vendored
Normal file
135
webui/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js
generated
vendored
Normal file
|
@ -0,0 +1,135 @@
|
|||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(global = global || self, factory(global.sourcemapCodec = {}));
|
||||
}(this, function (exports) { 'use strict';
|
||||
|
||||
var charToInteger = {};
|
||||
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
||||
for (var i = 0; i < chars.length; i++) {
|
||||
charToInteger[chars.charCodeAt(i)] = i;
|
||||
}
|
||||
function decode(mappings) {
|
||||
var decoded = [];
|
||||
var line = [];
|
||||
var segment = [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
];
|
||||
var j = 0;
|
||||
for (var i = 0, shift = 0, value = 0; i < mappings.length; i++) {
|
||||
var c = mappings.charCodeAt(i);
|
||||
if (c === 44) { // ","
|
||||
segmentify(line, segment, j);
|
||||
j = 0;
|
||||
}
|
||||
else if (c === 59) { // ";"
|
||||
segmentify(line, segment, j);
|
||||
j = 0;
|
||||
decoded.push(line);
|
||||
line = [];
|
||||
segment[0] = 0;
|
||||
}
|
||||
else {
|
||||
var integer = charToInteger[c];
|
||||
if (integer === undefined) {
|
||||
throw new Error('Invalid character (' + String.fromCharCode(c) + ')');
|
||||
}
|
||||
var hasContinuationBit = integer & 32;
|
||||
integer &= 31;
|
||||
value += integer << shift;
|
||||
if (hasContinuationBit) {
|
||||
shift += 5;
|
||||
}
|
||||
else {
|
||||
var shouldNegate = value & 1;
|
||||
value >>>= 1;
|
||||
if (shouldNegate) {
|
||||
value = value === 0 ? -0x80000000 : -value;
|
||||
}
|
||||
segment[j] += value;
|
||||
j++;
|
||||
value = shift = 0; // reset
|
||||
}
|
||||
}
|
||||
}
|
||||
segmentify(line, segment, j);
|
||||
decoded.push(line);
|
||||
return decoded;
|
||||
}
|
||||
function segmentify(line, segment, j) {
|
||||
// This looks ugly, but we're creating specialized arrays with a specific
|
||||
// length. This is much faster than creating a new array (which v8 expands to
|
||||
// a capacity of 17 after pushing the first item), or slicing out a subarray
|
||||
// (which is slow). Length 4 is assumed to be the most frequent, followed by
|
||||
// length 5 (since not everything will have an associated name), followed by
|
||||
// length 1 (it's probably rare for a source substring to not have an
|
||||
// associated segment data).
|
||||
if (j === 4)
|
||||
line.push([segment[0], segment[1], segment[2], segment[3]]);
|
||||
else if (j === 5)
|
||||
line.push([segment[0], segment[1], segment[2], segment[3], segment[4]]);
|
||||
else if (j === 1)
|
||||
line.push([segment[0]]);
|
||||
}
|
||||
function encode(decoded) {
|
||||
var sourceFileIndex = 0; // second field
|
||||
var sourceCodeLine = 0; // third field
|
||||
var sourceCodeColumn = 0; // fourth field
|
||||
var nameIndex = 0; // fifth field
|
||||
var mappings = '';
|
||||
for (var i = 0; i < decoded.length; i++) {
|
||||
var line = decoded[i];
|
||||
if (i > 0)
|
||||
mappings += ';';
|
||||
if (line.length === 0)
|
||||
continue;
|
||||
var generatedCodeColumn = 0; // first field
|
||||
var lineMappings = [];
|
||||
for (var _i = 0, line_1 = line; _i < line_1.length; _i++) {
|
||||
var segment = line_1[_i];
|
||||
var segmentMappings = encodeInteger(segment[0] - generatedCodeColumn);
|
||||
generatedCodeColumn = segment[0];
|
||||
if (segment.length > 1) {
|
||||
segmentMappings +=
|
||||
encodeInteger(segment[1] - sourceFileIndex) +
|
||||
encodeInteger(segment[2] - sourceCodeLine) +
|
||||
encodeInteger(segment[3] - sourceCodeColumn);
|
||||
sourceFileIndex = segment[1];
|
||||
sourceCodeLine = segment[2];
|
||||
sourceCodeColumn = segment[3];
|
||||
}
|
||||
if (segment.length === 5) {
|
||||
segmentMappings += encodeInteger(segment[4] - nameIndex);
|
||||
nameIndex = segment[4];
|
||||
}
|
||||
lineMappings.push(segmentMappings);
|
||||
}
|
||||
mappings += lineMappings.join(',');
|
||||
}
|
||||
return mappings;
|
||||
}
|
||||
function encodeInteger(num) {
|
||||
var result = '';
|
||||
num = num < 0 ? (-num << 1) | 1 : num << 1;
|
||||
do {
|
||||
var clamped = num & 31;
|
||||
num >>>= 5;
|
||||
if (num > 0) {
|
||||
clamped |= 32;
|
||||
}
|
||||
result += chars[clamped];
|
||||
} while (num > 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
exports.decode = decode;
|
||||
exports.encode = encode;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
}));
|
||||
//# sourceMappingURL=sourcemap-codec.umd.js.map
|
1
webui/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js.map
generated
vendored
Normal file
1
webui/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
5
webui/node_modules/sourcemap-codec/dist/types/sourcemap-codec.d.ts
generated
vendored
Normal file
5
webui/node_modules/sourcemap-codec/dist/types/sourcemap-codec.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
export declare type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number];
|
||||
export declare type SourceMapLine = SourceMapSegment[];
|
||||
export declare type SourceMapMappings = SourceMapLine[];
|
||||
export declare function decode(mappings: string): SourceMapMappings;
|
||||
export declare function encode(decoded: SourceMapMappings): string;
|
53
webui/node_modules/sourcemap-codec/package.json
generated
vendored
Normal file
53
webui/node_modules/sourcemap-codec/package.json
generated
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"name": "sourcemap-codec",
|
||||
"version": "1.4.8",
|
||||
"description": "Encode/decode sourcemap mappings",
|
||||
"main": "dist/sourcemap-codec.umd.js",
|
||||
"module": "dist/sourcemap-codec.es.js",
|
||||
"types": "dist/types/sourcemap-codec.d.ts",
|
||||
"scripts": {
|
||||
"test": "mocha",
|
||||
"build": "rm -rf dist && rollup -c && tsc",
|
||||
"pretest": "npm run build",
|
||||
"prepublish": "npm test",
|
||||
"lint": "eslint src",
|
||||
"pretest-coverage": "npm run build",
|
||||
"test-coverage": "rm -rf coverage/* && istanbul cover --report json node_modules/.bin/_mocha -- -u exports -R spec test/test.js",
|
||||
"posttest-coverage": "remap-istanbul -i coverage/coverage-final.json -o coverage/coverage-remapped.json -b dist && remap-istanbul -i coverage/coverage-final.json -o coverage/coverage-remapped.lcov -t lcovonly -b dist && remap-istanbul -i coverage/coverage-final.json -o coverage/coverage-remapped -t html -b dist",
|
||||
"ci": "npm run test-coverage && codecov < coverage/coverage-remapped.lcov"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Rich-Harris/sourcemap-codec"
|
||||
},
|
||||
"keywords": [
|
||||
"sourcemap",
|
||||
"vlq"
|
||||
],
|
||||
"author": "Rich Harris",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/Rich-Harris/sourcemap-codec/issues"
|
||||
},
|
||||
"homepage": "https://github.com/Rich-Harris/sourcemap-codec",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"codecov.io": "^0.1.6",
|
||||
"console-group": "^0.3.3",
|
||||
"eslint": "^6.0.1",
|
||||
"eslint-plugin-import": "^2.18.0",
|
||||
"istanbul": "^0.4.5",
|
||||
"mocha": "^6.1.4",
|
||||
"remap-istanbul": "^0.13.0",
|
||||
"rollup": "^1.16.4",
|
||||
"rollup-plugin-node-resolve": "^5.2.0",
|
||||
"rollup-plugin-typescript": "^1.0.1",
|
||||
"typescript": "^3.5.2"
|
||||
},
|
||||
"files": [
|
||||
"dist/*.js",
|
||||
"dist/*.js.map",
|
||||
"dist/**/*.d.ts",
|
||||
"README.md"
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue