Add: node_modules

This commit is contained in:
Cutls
2019-09-12 23:38:13 +09:00
parent 4769c83958
commit 25a1db84a4
7934 changed files with 956263 additions and 1 deletions

21
app/node_modules/@jimp/plugin-gaussian/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2018 Oliver Moran
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.

25
app/node_modules/@jimp/plugin-gaussian/README.md generated vendored Normal file
View File

@@ -0,0 +1,25 @@
<div align="center">
<img width="200" height="200"
src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
<h1>@jimp/plugin-gaussian</h1>
<p>Gaussian blur an image.</p>
</div>
Applies a true Gaussian blur to the image (warning: this is VERY slow)
## Usage
- @param {number} r the pixel radius of the blur
- @param {function(Error, Jimp)} cb (optional) a callback for when complete
```js
import jimp from 'jimp';
async function main() {
const image = await jimp.read('test/image.png');
image.resize(150, jimp.AUTO);
}
main();
```

89
app/node_modules/@jimp/plugin-gaussian/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,89 @@
"use strict";
require("core-js/modules/es6.object.define-property");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _utils = require("@jimp/utils");
/**
* Applies a true Gaussian blur to the image (warning: this is VERY slow)
* @param {number} r the pixel radius of the blur
* @param {function(Error, Jimp)} cb (optional) a callback for when complete
* @returns {Jimp} this for chaining of methods
*/
var _default = function _default() {
return {
gaussian: function gaussian(r, cb) {
// http://blog.ivank.net/fastest-gaussian-blur.html
if (typeof r !== 'number') {
return _utils.throwError.call(this, 'r must be a number', cb);
}
if (r < 1) {
return _utils.throwError.call(this, 'r must be greater than 0', cb);
}
var rs = Math.ceil(r * 2.57); // significant radius
var range = rs * 2 + 1;
var rr2 = r * r * 2;
var rr2pi = rr2 * Math.PI;
var weights = [];
for (var y = 0; y < range; y++) {
weights[y] = [];
for (var x = 0; x < range; x++) {
var dsq = Math.pow(x - rs, 2) + Math.pow(y - rs, 2);
weights[y][x] = Math.exp(-dsq / rr2) / rr2pi;
}
}
for (var _y = 0; _y < this.bitmap.height; _y++) {
for (var _x = 0; _x < this.bitmap.width; _x++) {
var red = 0;
var green = 0;
var blue = 0;
var alpha = 0;
var wsum = 0;
for (var iy = 0; iy < range; iy++) {
for (var ix = 0; ix < range; ix++) {
var x1 = Math.min(this.bitmap.width - 1, Math.max(0, ix + _x - rs));
var y1 = Math.min(this.bitmap.height - 1, Math.max(0, iy + _y - rs));
var weight = weights[iy][ix];
var _idx = y1 * this.bitmap.width + x1 << 2;
red += this.bitmap.data[_idx] * weight;
green += this.bitmap.data[_idx + 1] * weight;
blue += this.bitmap.data[_idx + 2] * weight;
alpha += this.bitmap.data[_idx + 3] * weight;
wsum += weight;
}
var idx = _y * this.bitmap.width + _x << 2;
this.bitmap.data[idx] = Math.round(red / wsum);
this.bitmap.data[idx + 1] = Math.round(green / wsum);
this.bitmap.data[idx + 2] = Math.round(blue / wsum);
this.bitmap.data[idx + 3] = Math.round(alpha / wsum);
}
}
}
if ((0, _utils.isNodePattern)(cb)) {
cb.call(this, null, this);
}
return this;
}
};
};
exports.default = _default;
module.exports = exports.default;
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

77
app/node_modules/@jimp/plugin-gaussian/es/index.js generated vendored Normal file
View File

@@ -0,0 +1,77 @@
import { isNodePattern, throwError } from '@jimp/utils';
/**
* Applies a true Gaussian blur to the image (warning: this is VERY slow)
* @param {number} r the pixel radius of the blur
* @param {function(Error, Jimp)} cb (optional) a callback for when complete
* @returns {Jimp} this for chaining of methods
*/
export default (function () {
return {
gaussian: function gaussian(r, cb) {
// http://blog.ivank.net/fastest-gaussian-blur.html
if (typeof r !== 'number') {
return throwError.call(this, 'r must be a number', cb);
}
if (r < 1) {
return throwError.call(this, 'r must be greater than 0', cb);
}
var rs = Math.ceil(r * 2.57); // significant radius
var range = rs * 2 + 1;
var rr2 = r * r * 2;
var rr2pi = rr2 * Math.PI;
var weights = [];
for (var y = 0; y < range; y++) {
weights[y] = [];
for (var x = 0; x < range; x++) {
var dsq = Math.pow(x - rs, 2) + Math.pow(y - rs, 2);
weights[y][x] = Math.exp(-dsq / rr2) / rr2pi;
}
}
for (var _y = 0; _y < this.bitmap.height; _y++) {
for (var _x = 0; _x < this.bitmap.width; _x++) {
var red = 0;
var green = 0;
var blue = 0;
var alpha = 0;
var wsum = 0;
for (var iy = 0; iy < range; iy++) {
for (var ix = 0; ix < range; ix++) {
var x1 = Math.min(this.bitmap.width - 1, Math.max(0, ix + _x - rs));
var y1 = Math.min(this.bitmap.height - 1, Math.max(0, iy + _y - rs));
var weight = weights[iy][ix];
var _idx = y1 * this.bitmap.width + x1 << 2;
red += this.bitmap.data[_idx] * weight;
green += this.bitmap.data[_idx + 1] * weight;
blue += this.bitmap.data[_idx + 2] * weight;
alpha += this.bitmap.data[_idx + 3] * weight;
wsum += weight;
}
var idx = _y * this.bitmap.width + _x << 2;
this.bitmap.data[idx] = Math.round(red / wsum);
this.bitmap.data[idx + 1] = Math.round(green / wsum);
this.bitmap.data[idx + 2] = Math.round(blue / wsum);
this.bitmap.data[idx + 3] = Math.round(alpha / wsum);
}
}
}
if (isNodePattern(cb)) {
cb.call(this, null, this);
}
return this;
}
};
});
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

58
app/node_modules/@jimp/plugin-gaussian/package.json generated vendored Normal file
View File

@@ -0,0 +1,58 @@
{
"_args": [
[
"@jimp/plugin-gaussian@0.6.4",
"C:\\Users\\ryuki\\TheDesk\\app"
]
],
"_from": "@jimp/plugin-gaussian@0.6.4",
"_id": "@jimp/plugin-gaussian@0.6.4",
"_inBundle": false,
"_integrity": "sha512-C1P6ohzIddpNb7CX5X+ygbp+ow8Fpt64ZLoIgdjYPs/42HxKluvY62fVfMhY6m5zUGKIMbg0uYeAtz/9LRJPyw==",
"_location": "/@jimp/plugin-gaussian",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@jimp/plugin-gaussian@0.6.4",
"name": "@jimp/plugin-gaussian",
"escapedName": "@jimp%2fplugin-gaussian",
"scope": "@jimp",
"rawSpec": "0.6.4",
"saveSpec": null,
"fetchSpec": "0.6.4"
},
"_requiredBy": [
"/@jimp/plugins"
],
"_resolved": "https://registry.npmjs.org/@jimp/plugin-gaussian/-/plugin-gaussian-0.6.4.tgz",
"_spec": "0.6.4",
"_where": "C:\\Users\\ryuki\\TheDesk\\app",
"author": "",
"dependencies": {
"@jimp/utils": "^0.6.4",
"core-js": "^2.5.7"
},
"description": "gaussian blur an image.",
"gitHead": "7c9d3c817cade88d4a20422be10670d3c1528429",
"license": "MIT",
"main": "dist/index.js",
"module": "es/index.js",
"name": "@jimp/plugin-gaussian",
"peerDependencies": {
"@jimp/custom": ">=0.3.5"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "npm run build:node:production && npm run build:module",
"build:debug": "npm run build:node:debug",
"build:module": "cross-env BABEL_ENV=module babel src -d es --source-maps --config-file ../../babel.config.js",
"build:node": "babel src -d dist --source-maps --config-file ../../babel.config.js",
"build:node:debug": "cross-env BABEL_ENV=development npm run build:node",
"build:node:production": "cross-env BABEL_ENV=production npm run build:node",
"build:watch": "npm run build:node:debug -- -- --watch --verbose"
},
"version": "0.6.4"
}

73
app/node_modules/@jimp/plugin-gaussian/src/index.js generated vendored Normal file
View File

@@ -0,0 +1,73 @@
import { isNodePattern, throwError } from '@jimp/utils';
/**
* Applies a true Gaussian blur to the image (warning: this is VERY slow)
* @param {number} r the pixel radius of the blur
* @param {function(Error, Jimp)} cb (optional) a callback for when complete
* @returns {Jimp} this for chaining of methods
*/
export default () => ({
gaussian(r, cb) {
// http://blog.ivank.net/fastest-gaussian-blur.html
if (typeof r !== 'number') {
return throwError.call(this, 'r must be a number', cb);
}
if (r < 1) {
return throwError.call(this, 'r must be greater than 0', cb);
}
const rs = Math.ceil(r * 2.57); // significant radius
const range = rs * 2 + 1;
const rr2 = r * r * 2;
const rr2pi = rr2 * Math.PI;
const weights = [];
for (let y = 0; y < range; y++) {
weights[y] = [];
for (let x = 0; x < range; x++) {
const dsq = (x - rs) ** 2 + (y - rs) ** 2 ;
weights[y][x] = Math.exp(-dsq / rr2) / rr2pi;
}
}
for (let y = 0; y < this.bitmap.height; y++) {
for (let x = 0; x < this.bitmap.width; x++) {
let red = 0;
let green = 0;
let blue = 0;
let alpha = 0;
let wsum = 0;
for (let iy = 0; iy < range; iy++) {
for (let ix = 0; ix < range; ix++) {
const x1 = Math.min(this.bitmap.width - 1, Math.max(0, ix + x - rs ));
const y1 = Math.min(this.bitmap.height - 1, Math.max(0, iy + y - rs));
const weight = weights[iy][ix];
const idx = (y1 * this.bitmap.width + x1) << 2;
red += this.bitmap.data[idx] * weight;
green += this.bitmap.data[idx + 1] * weight;
blue += this.bitmap.data[idx + 2] * weight;
alpha += this.bitmap.data[idx + 3] * weight;
wsum += weight;
}
const idx = (y * this.bitmap.width + x) << 2;
this.bitmap.data[idx] = Math.round(red / wsum);
this.bitmap.data[idx + 1] = Math.round(green / wsum);
this.bitmap.data[idx + 2] = Math.round(blue / wsum);
this.bitmap.data[idx + 3] = Math.round(alpha / wsum);
}
}
}
if (isNodePattern(cb)) {
cb.call(this, null, this);
}
return this;
}
});