@blazediff/cli 2.1.3 → 2.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/cli.js +847 -726
- package/dist/commands/{bin.js → core-native.js} +10 -10
- package/dist/commands/core.js +830 -709
- package/dist/commands/gmsd.js +830 -709
- package/dist/commands/hitchhikers-ssim.js +830 -709
- package/dist/commands/msssim.js +830 -709
- package/dist/commands/ssim.js +830 -709
- package/dist/index.d.ts +2 -2
- package/package.json +4 -4
|
@@ -2122,7 +2122,7 @@ var require_png = __commonJS({
|
|
|
2122
2122
|
}
|
|
2123
2123
|
});
|
|
2124
2124
|
|
|
2125
|
-
// ../pngjs
|
|
2125
|
+
// ../codec-pngjs/dist/index.mjs
|
|
2126
2126
|
var dist_exports = {};
|
|
2127
2127
|
__export(dist_exports, {
|
|
2128
2128
|
default: () => m,
|
|
@@ -2150,7 +2150,7 @@ async function s(r, n2) {
|
|
|
2150
2150
|
}
|
|
2151
2151
|
var import_fs, import_pngjs, c, m;
|
|
2152
2152
|
var init_dist = __esm({
|
|
2153
|
-
"../pngjs
|
|
2153
|
+
"../codec-pngjs/dist/index.mjs"() {
|
|
2154
2154
|
"use strict";
|
|
2155
2155
|
import_fs = require("fs");
|
|
2156
2156
|
import_pngjs = __toESM(require_png(), 1);
|
|
@@ -2159,29 +2159,17 @@ var init_dist = __esm({
|
|
|
2159
2159
|
}
|
|
2160
2160
|
});
|
|
2161
2161
|
|
|
2162
|
-
// ../../node_modules/.pnpm/sharp@0.34.
|
|
2162
|
+
// ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/is.js
|
|
2163
2163
|
var require_is = __commonJS({
|
|
2164
|
-
"../../node_modules/.pnpm/sharp@0.34.
|
|
2164
|
+
"../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/is.js"(exports2, module2) {
|
|
2165
2165
|
"use strict";
|
|
2166
|
-
var defined =
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
var
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
var
|
|
2173
|
-
return Object.prototype.toString.call(val) === "[object Object]";
|
|
2174
|
-
};
|
|
2175
|
-
var fn = function(val) {
|
|
2176
|
-
return typeof val === "function";
|
|
2177
|
-
};
|
|
2178
|
-
var bool = function(val) {
|
|
2179
|
-
return typeof val === "boolean";
|
|
2180
|
-
};
|
|
2181
|
-
var buffer = function(val) {
|
|
2182
|
-
return val instanceof Buffer;
|
|
2183
|
-
};
|
|
2184
|
-
var typedArray = function(val) {
|
|
2166
|
+
var defined = (val) => typeof val !== "undefined" && val !== null;
|
|
2167
|
+
var object = (val) => typeof val === "object";
|
|
2168
|
+
var plainObject = (val) => Object.prototype.toString.call(val) === "[object Object]";
|
|
2169
|
+
var fn = (val) => typeof val === "function";
|
|
2170
|
+
var bool = (val) => typeof val === "boolean";
|
|
2171
|
+
var buffer = (val) => val instanceof Buffer;
|
|
2172
|
+
var typedArray = (val) => {
|
|
2185
2173
|
if (defined(val)) {
|
|
2186
2174
|
switch (val.constructor) {
|
|
2187
2175
|
case Uint8Array:
|
|
@@ -2198,30 +2186,16 @@ var require_is = __commonJS({
|
|
|
2198
2186
|
}
|
|
2199
2187
|
return false;
|
|
2200
2188
|
};
|
|
2201
|
-
var arrayBuffer =
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
var
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
var
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
var
|
|
2211
|
-
return Number.isInteger(val);
|
|
2212
|
-
};
|
|
2213
|
-
var inRange = function(val, min, max) {
|
|
2214
|
-
return val >= min && val <= max;
|
|
2215
|
-
};
|
|
2216
|
-
var inArray = function(val, list) {
|
|
2217
|
-
return list.includes(val);
|
|
2218
|
-
};
|
|
2219
|
-
var invalidParameterError = function(name, expected, actual) {
|
|
2220
|
-
return new Error(
|
|
2221
|
-
`Expected ${expected} for ${name} but received ${actual} of type ${typeof actual}`
|
|
2222
|
-
);
|
|
2223
|
-
};
|
|
2224
|
-
var nativeError = function(native, context) {
|
|
2189
|
+
var arrayBuffer = (val) => val instanceof ArrayBuffer;
|
|
2190
|
+
var string = (val) => typeof val === "string" && val.length > 0;
|
|
2191
|
+
var number = (val) => typeof val === "number" && !Number.isNaN(val);
|
|
2192
|
+
var integer = (val) => Number.isInteger(val);
|
|
2193
|
+
var inRange = (val, min, max) => val >= min && val <= max;
|
|
2194
|
+
var inArray = (val, list) => list.includes(val);
|
|
2195
|
+
var invalidParameterError = (name, expected, actual) => new Error(
|
|
2196
|
+
`Expected ${expected} for ${name} but received ${actual} of type ${typeof actual}`
|
|
2197
|
+
);
|
|
2198
|
+
var nativeError = (native, context) => {
|
|
2225
2199
|
context.message = native.message;
|
|
2226
2200
|
return context;
|
|
2227
2201
|
};
|
|
@@ -2245,9 +2219,9 @@ var require_is = __commonJS({
|
|
|
2245
2219
|
}
|
|
2246
2220
|
});
|
|
2247
2221
|
|
|
2248
|
-
// ../../node_modules/.pnpm/detect-libc@2.
|
|
2222
|
+
// ../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/process.js
|
|
2249
2223
|
var require_process = __commonJS({
|
|
2250
|
-
"../../node_modules/.pnpm/detect-libc@2.
|
|
2224
|
+
"../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/process.js"(exports2, module2) {
|
|
2251
2225
|
"use strict";
|
|
2252
2226
|
var isLinux = () => process.platform === "linux";
|
|
2253
2227
|
var report = null;
|
|
@@ -2268,37 +2242,91 @@ var require_process = __commonJS({
|
|
|
2268
2242
|
}
|
|
2269
2243
|
});
|
|
2270
2244
|
|
|
2271
|
-
// ../../node_modules/.pnpm/detect-libc@2.
|
|
2245
|
+
// ../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/filesystem.js
|
|
2272
2246
|
var require_filesystem = __commonJS({
|
|
2273
|
-
"../../node_modules/.pnpm/detect-libc@2.
|
|
2247
|
+
"../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/filesystem.js"(exports2, module2) {
|
|
2274
2248
|
"use strict";
|
|
2275
2249
|
var fs = require("fs");
|
|
2276
2250
|
var LDD_PATH = "/usr/bin/ldd";
|
|
2277
|
-
var
|
|
2251
|
+
var SELF_PATH = "/proc/self/exe";
|
|
2252
|
+
var MAX_LENGTH = 2048;
|
|
2253
|
+
var readFileSync2 = (path) => {
|
|
2254
|
+
const fd = fs.openSync(path, "r");
|
|
2255
|
+
const buffer = Buffer.alloc(MAX_LENGTH);
|
|
2256
|
+
const bytesRead = fs.readSync(fd, buffer, 0, MAX_LENGTH, 0);
|
|
2257
|
+
fs.close(fd, () => {
|
|
2258
|
+
});
|
|
2259
|
+
return buffer.subarray(0, bytesRead);
|
|
2260
|
+
};
|
|
2278
2261
|
var readFile = (path) => new Promise((resolve, reject) => {
|
|
2279
|
-
fs.
|
|
2262
|
+
fs.open(path, "r", (err, fd) => {
|
|
2280
2263
|
if (err) {
|
|
2281
2264
|
reject(err);
|
|
2282
2265
|
} else {
|
|
2283
|
-
|
|
2266
|
+
const buffer = Buffer.alloc(MAX_LENGTH);
|
|
2267
|
+
fs.read(fd, buffer, 0, MAX_LENGTH, 0, (_, bytesRead) => {
|
|
2268
|
+
resolve(buffer.subarray(0, bytesRead));
|
|
2269
|
+
fs.close(fd, () => {
|
|
2270
|
+
});
|
|
2271
|
+
});
|
|
2284
2272
|
}
|
|
2285
2273
|
});
|
|
2286
2274
|
});
|
|
2287
2275
|
module2.exports = {
|
|
2288
2276
|
LDD_PATH,
|
|
2277
|
+
SELF_PATH,
|
|
2289
2278
|
readFileSync: readFileSync2,
|
|
2290
2279
|
readFile
|
|
2291
2280
|
};
|
|
2292
2281
|
}
|
|
2293
2282
|
});
|
|
2294
2283
|
|
|
2295
|
-
// ../../node_modules/.pnpm/detect-libc@2.
|
|
2284
|
+
// ../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/elf.js
|
|
2285
|
+
var require_elf = __commonJS({
|
|
2286
|
+
"../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/elf.js"(exports2, module2) {
|
|
2287
|
+
"use strict";
|
|
2288
|
+
var interpreterPath = (elf) => {
|
|
2289
|
+
if (elf.length < 64) {
|
|
2290
|
+
return null;
|
|
2291
|
+
}
|
|
2292
|
+
if (elf.readUInt32BE(0) !== 2135247942) {
|
|
2293
|
+
return null;
|
|
2294
|
+
}
|
|
2295
|
+
if (elf.readUInt8(4) !== 2) {
|
|
2296
|
+
return null;
|
|
2297
|
+
}
|
|
2298
|
+
if (elf.readUInt8(5) !== 1) {
|
|
2299
|
+
return null;
|
|
2300
|
+
}
|
|
2301
|
+
const offset = elf.readUInt32LE(32);
|
|
2302
|
+
const size = elf.readUInt16LE(54);
|
|
2303
|
+
const count = elf.readUInt16LE(56);
|
|
2304
|
+
for (let i2 = 0; i2 < count; i2++) {
|
|
2305
|
+
const headerOffset = offset + i2 * size;
|
|
2306
|
+
const type = elf.readUInt32LE(headerOffset);
|
|
2307
|
+
if (type === 3) {
|
|
2308
|
+
const fileOffset = elf.readUInt32LE(headerOffset + 8);
|
|
2309
|
+
const fileSize = elf.readUInt32LE(headerOffset + 32);
|
|
2310
|
+
return elf.subarray(fileOffset, fileOffset + fileSize).toString().replace(/\0.*$/g, "");
|
|
2311
|
+
}
|
|
2312
|
+
}
|
|
2313
|
+
return null;
|
|
2314
|
+
};
|
|
2315
|
+
module2.exports = {
|
|
2316
|
+
interpreterPath
|
|
2317
|
+
};
|
|
2318
|
+
}
|
|
2319
|
+
});
|
|
2320
|
+
|
|
2321
|
+
// ../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/detect-libc.js
|
|
2296
2322
|
var require_detect_libc = __commonJS({
|
|
2297
|
-
"../../node_modules/.pnpm/detect-libc@2.
|
|
2323
|
+
"../../node_modules/.pnpm/detect-libc@2.1.2/node_modules/detect-libc/lib/detect-libc.js"(exports2, module2) {
|
|
2298
2324
|
"use strict";
|
|
2299
2325
|
var childProcess = require("child_process");
|
|
2300
2326
|
var { isLinux, getReport } = require_process();
|
|
2301
|
-
var { LDD_PATH, readFile, readFileSync: readFileSync2 } = require_filesystem();
|
|
2327
|
+
var { LDD_PATH, SELF_PATH, readFile, readFileSync: readFileSync2 } = require_filesystem();
|
|
2328
|
+
var { interpreterPath } = require_elf();
|
|
2329
|
+
var cachedFamilyInterpreter;
|
|
2302
2330
|
var cachedFamilyFilesystem;
|
|
2303
2331
|
var cachedVersionFilesystem;
|
|
2304
2332
|
var command = "getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true";
|
|
@@ -2350,7 +2378,18 @@ var require_detect_libc = __commonJS({
|
|
|
2350
2378
|
}
|
|
2351
2379
|
return null;
|
|
2352
2380
|
};
|
|
2381
|
+
var familyFromInterpreterPath = (path) => {
|
|
2382
|
+
if (path) {
|
|
2383
|
+
if (path.includes("/ld-musl-")) {
|
|
2384
|
+
return MUSL;
|
|
2385
|
+
} else if (path.includes("/ld-linux-")) {
|
|
2386
|
+
return GLIBC;
|
|
2387
|
+
}
|
|
2388
|
+
}
|
|
2389
|
+
return null;
|
|
2390
|
+
};
|
|
2353
2391
|
var getFamilyFromLddContent = (content) => {
|
|
2392
|
+
content = content.toString();
|
|
2354
2393
|
if (content.includes("musl")) {
|
|
2355
2394
|
return MUSL;
|
|
2356
2395
|
}
|
|
@@ -2383,16 +2422,45 @@ var require_detect_libc = __commonJS({
|
|
|
2383
2422
|
}
|
|
2384
2423
|
return cachedFamilyFilesystem;
|
|
2385
2424
|
};
|
|
2425
|
+
var familyFromInterpreter = async () => {
|
|
2426
|
+
if (cachedFamilyInterpreter !== void 0) {
|
|
2427
|
+
return cachedFamilyInterpreter;
|
|
2428
|
+
}
|
|
2429
|
+
cachedFamilyInterpreter = null;
|
|
2430
|
+
try {
|
|
2431
|
+
const selfContent = await readFile(SELF_PATH);
|
|
2432
|
+
const path = interpreterPath(selfContent);
|
|
2433
|
+
cachedFamilyInterpreter = familyFromInterpreterPath(path);
|
|
2434
|
+
} catch (e) {
|
|
2435
|
+
}
|
|
2436
|
+
return cachedFamilyInterpreter;
|
|
2437
|
+
};
|
|
2438
|
+
var familyFromInterpreterSync = () => {
|
|
2439
|
+
if (cachedFamilyInterpreter !== void 0) {
|
|
2440
|
+
return cachedFamilyInterpreter;
|
|
2441
|
+
}
|
|
2442
|
+
cachedFamilyInterpreter = null;
|
|
2443
|
+
try {
|
|
2444
|
+
const selfContent = readFileSync2(SELF_PATH);
|
|
2445
|
+
const path = interpreterPath(selfContent);
|
|
2446
|
+
cachedFamilyInterpreter = familyFromInterpreterPath(path);
|
|
2447
|
+
} catch (e) {
|
|
2448
|
+
}
|
|
2449
|
+
return cachedFamilyInterpreter;
|
|
2450
|
+
};
|
|
2386
2451
|
var family = async () => {
|
|
2387
2452
|
let family2 = null;
|
|
2388
2453
|
if (isLinux()) {
|
|
2389
|
-
family2 = await
|
|
2454
|
+
family2 = await familyFromInterpreter();
|
|
2390
2455
|
if (!family2) {
|
|
2391
|
-
family2 =
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2456
|
+
family2 = await familyFromFilesystem();
|
|
2457
|
+
if (!family2) {
|
|
2458
|
+
family2 = familyFromReport();
|
|
2459
|
+
}
|
|
2460
|
+
if (!family2) {
|
|
2461
|
+
const out = await safeCommand();
|
|
2462
|
+
family2 = familyFromCommand(out);
|
|
2463
|
+
}
|
|
2396
2464
|
}
|
|
2397
2465
|
}
|
|
2398
2466
|
return family2;
|
|
@@ -2400,13 +2468,16 @@ var require_detect_libc = __commonJS({
|
|
|
2400
2468
|
var familySync = () => {
|
|
2401
2469
|
let family2 = null;
|
|
2402
2470
|
if (isLinux()) {
|
|
2403
|
-
family2 =
|
|
2404
|
-
if (!family2) {
|
|
2405
|
-
family2 = familyFromReport();
|
|
2406
|
-
}
|
|
2471
|
+
family2 = familyFromInterpreterSync();
|
|
2407
2472
|
if (!family2) {
|
|
2408
|
-
|
|
2409
|
-
|
|
2473
|
+
family2 = familyFromFilesystemSync();
|
|
2474
|
+
if (!family2) {
|
|
2475
|
+
family2 = familyFromReport();
|
|
2476
|
+
}
|
|
2477
|
+
if (!family2) {
|
|
2478
|
+
const out = safeCommandSync();
|
|
2479
|
+
family2 = familyFromCommand(out);
|
|
2480
|
+
}
|
|
2410
2481
|
}
|
|
2411
2482
|
}
|
|
2412
2483
|
return family2;
|
|
@@ -2502,9 +2573,9 @@ var require_detect_libc = __commonJS({
|
|
|
2502
2573
|
}
|
|
2503
2574
|
});
|
|
2504
2575
|
|
|
2505
|
-
// ../../node_modules/.pnpm/semver@7.7.
|
|
2576
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js
|
|
2506
2577
|
var require_debug = __commonJS({
|
|
2507
|
-
"../../node_modules/.pnpm/semver@7.7.
|
|
2578
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js"(exports2, module2) {
|
|
2508
2579
|
"use strict";
|
|
2509
2580
|
var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
2510
2581
|
};
|
|
@@ -2512,9 +2583,9 @@ var require_debug = __commonJS({
|
|
|
2512
2583
|
}
|
|
2513
2584
|
});
|
|
2514
2585
|
|
|
2515
|
-
// ../../node_modules/.pnpm/semver@7.7.
|
|
2586
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js
|
|
2516
2587
|
var require_constants2 = __commonJS({
|
|
2517
|
-
"../../node_modules/.pnpm/semver@7.7.
|
|
2588
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js"(exports2, module2) {
|
|
2518
2589
|
"use strict";
|
|
2519
2590
|
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
2520
2591
|
var MAX_LENGTH = 256;
|
|
@@ -2544,9 +2615,9 @@ var require_constants2 = __commonJS({
|
|
|
2544
2615
|
}
|
|
2545
2616
|
});
|
|
2546
2617
|
|
|
2547
|
-
// ../../node_modules/.pnpm/semver@7.7.
|
|
2618
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.js
|
|
2548
2619
|
var require_re = __commonJS({
|
|
2549
|
-
"../../node_modules/.pnpm/semver@7.7.
|
|
2620
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.js"(exports2, module2) {
|
|
2550
2621
|
"use strict";
|
|
2551
2622
|
var {
|
|
2552
2623
|
MAX_SAFE_COMPONENT_LENGTH,
|
|
@@ -2632,9 +2703,9 @@ var require_re = __commonJS({
|
|
|
2632
2703
|
}
|
|
2633
2704
|
});
|
|
2634
2705
|
|
|
2635
|
-
// ../../node_modules/.pnpm/semver@7.7.
|
|
2706
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.js
|
|
2636
2707
|
var require_parse_options = __commonJS({
|
|
2637
|
-
"../../node_modules/.pnpm/semver@7.7.
|
|
2708
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.js"(exports2, module2) {
|
|
2638
2709
|
"use strict";
|
|
2639
2710
|
var looseOption = Object.freeze({ loose: true });
|
|
2640
2711
|
var emptyOpts = Object.freeze({});
|
|
@@ -2651,12 +2722,15 @@ var require_parse_options = __commonJS({
|
|
|
2651
2722
|
}
|
|
2652
2723
|
});
|
|
2653
2724
|
|
|
2654
|
-
// ../../node_modules/.pnpm/semver@7.7.
|
|
2725
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js
|
|
2655
2726
|
var require_identifiers = __commonJS({
|
|
2656
|
-
"../../node_modules/.pnpm/semver@7.7.
|
|
2727
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js"(exports2, module2) {
|
|
2657
2728
|
"use strict";
|
|
2658
2729
|
var numeric = /^[0-9]+$/;
|
|
2659
2730
|
var compareIdentifiers = (a2, b) => {
|
|
2731
|
+
if (typeof a2 === "number" && typeof b === "number") {
|
|
2732
|
+
return a2 === b ? 0 : a2 < b ? -1 : 1;
|
|
2733
|
+
}
|
|
2660
2734
|
const anum = numeric.test(a2);
|
|
2661
2735
|
const bnum = numeric.test(b);
|
|
2662
2736
|
if (anum && bnum) {
|
|
@@ -2673,9 +2747,9 @@ var require_identifiers = __commonJS({
|
|
|
2673
2747
|
}
|
|
2674
2748
|
});
|
|
2675
2749
|
|
|
2676
|
-
// ../../node_modules/.pnpm/semver@7.7.
|
|
2750
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.js
|
|
2677
2751
|
var require_semver = __commonJS({
|
|
2678
|
-
"../../node_modules/.pnpm/semver@7.7.
|
|
2752
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.js"(exports2, module2) {
|
|
2679
2753
|
"use strict";
|
|
2680
2754
|
var debug = require_debug();
|
|
2681
2755
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants2();
|
|
@@ -2763,7 +2837,25 @@ var require_semver = __commonJS({
|
|
|
2763
2837
|
if (!(other instanceof _SemVer)) {
|
|
2764
2838
|
other = new _SemVer(other, this.options);
|
|
2765
2839
|
}
|
|
2766
|
-
|
|
2840
|
+
if (this.major < other.major) {
|
|
2841
|
+
return -1;
|
|
2842
|
+
}
|
|
2843
|
+
if (this.major > other.major) {
|
|
2844
|
+
return 1;
|
|
2845
|
+
}
|
|
2846
|
+
if (this.minor < other.minor) {
|
|
2847
|
+
return -1;
|
|
2848
|
+
}
|
|
2849
|
+
if (this.minor > other.minor) {
|
|
2850
|
+
return 1;
|
|
2851
|
+
}
|
|
2852
|
+
if (this.patch < other.patch) {
|
|
2853
|
+
return -1;
|
|
2854
|
+
}
|
|
2855
|
+
if (this.patch > other.patch) {
|
|
2856
|
+
return 1;
|
|
2857
|
+
}
|
|
2858
|
+
return 0;
|
|
2767
2859
|
}
|
|
2768
2860
|
comparePre(other) {
|
|
2769
2861
|
if (!(other instanceof _SemVer)) {
|
|
@@ -2934,9 +3026,9 @@ var require_semver = __commonJS({
|
|
|
2934
3026
|
}
|
|
2935
3027
|
});
|
|
2936
3028
|
|
|
2937
|
-
// ../../node_modules/.pnpm/semver@7.7.
|
|
3029
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js
|
|
2938
3030
|
var require_parse = __commonJS({
|
|
2939
|
-
"../../node_modules/.pnpm/semver@7.7.
|
|
3031
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js"(exports2, module2) {
|
|
2940
3032
|
"use strict";
|
|
2941
3033
|
var SemVer = require_semver();
|
|
2942
3034
|
var parse = (version, options, throwErrors = false) => {
|
|
@@ -2956,9 +3048,9 @@ var require_parse = __commonJS({
|
|
|
2956
3048
|
}
|
|
2957
3049
|
});
|
|
2958
3050
|
|
|
2959
|
-
// ../../node_modules/.pnpm/semver@7.7.
|
|
3051
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js
|
|
2960
3052
|
var require_coerce = __commonJS({
|
|
2961
|
-
"../../node_modules/.pnpm/semver@7.7.
|
|
3053
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.js"(exports2, module2) {
|
|
2962
3054
|
"use strict";
|
|
2963
3055
|
var SemVer = require_semver();
|
|
2964
3056
|
var parse = require_parse();
|
|
@@ -3002,9 +3094,9 @@ var require_coerce = __commonJS({
|
|
|
3002
3094
|
}
|
|
3003
3095
|
});
|
|
3004
3096
|
|
|
3005
|
-
// ../../node_modules/.pnpm/semver@7.7.
|
|
3097
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js
|
|
3006
3098
|
var require_compare = __commonJS({
|
|
3007
|
-
"../../node_modules/.pnpm/semver@7.7.
|
|
3099
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.js"(exports2, module2) {
|
|
3008
3100
|
"use strict";
|
|
3009
3101
|
var SemVer = require_semver();
|
|
3010
3102
|
var compare = (a2, b, loose) => new SemVer(a2, loose).compare(new SemVer(b, loose));
|
|
@@ -3012,9 +3104,9 @@ var require_compare = __commonJS({
|
|
|
3012
3104
|
}
|
|
3013
3105
|
});
|
|
3014
3106
|
|
|
3015
|
-
// ../../node_modules/.pnpm/semver@7.7.
|
|
3107
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js
|
|
3016
3108
|
var require_gte = __commonJS({
|
|
3017
|
-
"../../node_modules/.pnpm/semver@7.7.
|
|
3109
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.js"(exports2, module2) {
|
|
3018
3110
|
"use strict";
|
|
3019
3111
|
var compare = require_compare();
|
|
3020
3112
|
var gte = (a2, b, loose) => compare(a2, b, loose) >= 0;
|
|
@@ -3022,9 +3114,9 @@ var require_gte = __commonJS({
|
|
|
3022
3114
|
}
|
|
3023
3115
|
});
|
|
3024
3116
|
|
|
3025
|
-
// ../../node_modules/.pnpm/semver@7.7.
|
|
3117
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js
|
|
3026
3118
|
var require_lrucache = __commonJS({
|
|
3027
|
-
"../../node_modules/.pnpm/semver@7.7.
|
|
3119
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.js"(exports2, module2) {
|
|
3028
3120
|
"use strict";
|
|
3029
3121
|
var LRUCache = class {
|
|
3030
3122
|
constructor() {
|
|
@@ -3060,9 +3152,9 @@ var require_lrucache = __commonJS({
|
|
|
3060
3152
|
}
|
|
3061
3153
|
});
|
|
3062
3154
|
|
|
3063
|
-
// ../../node_modules/.pnpm/semver@7.7.
|
|
3155
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js
|
|
3064
3156
|
var require_eq = __commonJS({
|
|
3065
|
-
"../../node_modules/.pnpm/semver@7.7.
|
|
3157
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.js"(exports2, module2) {
|
|
3066
3158
|
"use strict";
|
|
3067
3159
|
var compare = require_compare();
|
|
3068
3160
|
var eq = (a2, b, loose) => compare(a2, b, loose) === 0;
|
|
@@ -3070,9 +3162,9 @@ var require_eq = __commonJS({
|
|
|
3070
3162
|
}
|
|
3071
3163
|
});
|
|
3072
3164
|
|
|
3073
|
-
// ../../node_modules/.pnpm/semver@7.7.
|
|
3165
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js
|
|
3074
3166
|
var require_neq = __commonJS({
|
|
3075
|
-
"../../node_modules/.pnpm/semver@7.7.
|
|
3167
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.js"(exports2, module2) {
|
|
3076
3168
|
"use strict";
|
|
3077
3169
|
var compare = require_compare();
|
|
3078
3170
|
var neq = (a2, b, loose) => compare(a2, b, loose) !== 0;
|
|
@@ -3080,9 +3172,9 @@ var require_neq = __commonJS({
|
|
|
3080
3172
|
}
|
|
3081
3173
|
});
|
|
3082
3174
|
|
|
3083
|
-
// ../../node_modules/.pnpm/semver@7.7.
|
|
3175
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js
|
|
3084
3176
|
var require_gt = __commonJS({
|
|
3085
|
-
"../../node_modules/.pnpm/semver@7.7.
|
|
3177
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.js"(exports2, module2) {
|
|
3086
3178
|
"use strict";
|
|
3087
3179
|
var compare = require_compare();
|
|
3088
3180
|
var gt = (a2, b, loose) => compare(a2, b, loose) > 0;
|
|
@@ -3090,9 +3182,9 @@ var require_gt = __commonJS({
|
|
|
3090
3182
|
}
|
|
3091
3183
|
});
|
|
3092
3184
|
|
|
3093
|
-
// ../../node_modules/.pnpm/semver@7.7.
|
|
3185
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js
|
|
3094
3186
|
var require_lt = __commonJS({
|
|
3095
|
-
"../../node_modules/.pnpm/semver@7.7.
|
|
3187
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.js"(exports2, module2) {
|
|
3096
3188
|
"use strict";
|
|
3097
3189
|
var compare = require_compare();
|
|
3098
3190
|
var lt = (a2, b, loose) => compare(a2, b, loose) < 0;
|
|
@@ -3100,9 +3192,9 @@ var require_lt = __commonJS({
|
|
|
3100
3192
|
}
|
|
3101
3193
|
});
|
|
3102
3194
|
|
|
3103
|
-
// ../../node_modules/.pnpm/semver@7.7.
|
|
3195
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js
|
|
3104
3196
|
var require_lte = __commonJS({
|
|
3105
|
-
"../../node_modules/.pnpm/semver@7.7.
|
|
3197
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.js"(exports2, module2) {
|
|
3106
3198
|
"use strict";
|
|
3107
3199
|
var compare = require_compare();
|
|
3108
3200
|
var lte = (a2, b, loose) => compare(a2, b, loose) <= 0;
|
|
@@ -3110,9 +3202,9 @@ var require_lte = __commonJS({
|
|
|
3110
3202
|
}
|
|
3111
3203
|
});
|
|
3112
3204
|
|
|
3113
|
-
// ../../node_modules/.pnpm/semver@7.7.
|
|
3205
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js
|
|
3114
3206
|
var require_cmp = __commonJS({
|
|
3115
|
-
"../../node_modules/.pnpm/semver@7.7.
|
|
3207
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.js"(exports2, module2) {
|
|
3116
3208
|
"use strict";
|
|
3117
3209
|
var eq = require_eq();
|
|
3118
3210
|
var neq = require_neq();
|
|
@@ -3160,9 +3252,9 @@ var require_cmp = __commonJS({
|
|
|
3160
3252
|
}
|
|
3161
3253
|
});
|
|
3162
3254
|
|
|
3163
|
-
// ../../node_modules/.pnpm/semver@7.7.
|
|
3255
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js
|
|
3164
3256
|
var require_comparator = __commonJS({
|
|
3165
|
-
"../../node_modules/.pnpm/semver@7.7.
|
|
3257
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.js"(exports2, module2) {
|
|
3166
3258
|
"use strict";
|
|
3167
3259
|
var ANY = Symbol("SemVer ANY");
|
|
3168
3260
|
var Comparator = class _Comparator {
|
|
@@ -3273,9 +3365,9 @@ var require_comparator = __commonJS({
|
|
|
3273
3365
|
}
|
|
3274
3366
|
});
|
|
3275
3367
|
|
|
3276
|
-
// ../../node_modules/.pnpm/semver@7.7.
|
|
3368
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js
|
|
3277
3369
|
var require_range = __commonJS({
|
|
3278
|
-
"../../node_modules/.pnpm/semver@7.7.
|
|
3370
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.js"(exports2, module2) {
|
|
3279
3371
|
"use strict";
|
|
3280
3372
|
var SPACE_CHARACTERS = /\s+/g;
|
|
3281
3373
|
var Range = class _Range {
|
|
@@ -3446,6 +3538,7 @@ var require_range = __commonJS({
|
|
|
3446
3538
|
return result;
|
|
3447
3539
|
};
|
|
3448
3540
|
var parseComparator = (comp, options) => {
|
|
3541
|
+
comp = comp.replace(re[t.BUILD], "");
|
|
3449
3542
|
debug("comp", comp, options);
|
|
3450
3543
|
comp = replaceCarets(comp, options);
|
|
3451
3544
|
debug("caret", comp);
|
|
@@ -3649,9 +3742,9 @@ var require_range = __commonJS({
|
|
|
3649
3742
|
}
|
|
3650
3743
|
});
|
|
3651
3744
|
|
|
3652
|
-
// ../../node_modules/.pnpm/semver@7.7.
|
|
3745
|
+
// ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js
|
|
3653
3746
|
var require_satisfies = __commonJS({
|
|
3654
|
-
"../../node_modules/.pnpm/semver@7.7.
|
|
3747
|
+
"../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.js"(exports2, module2) {
|
|
3655
3748
|
"use strict";
|
|
3656
3749
|
var Range = require_range();
|
|
3657
3750
|
var satisfies = (version, range, options) => {
|
|
@@ -3666,13 +3759,13 @@ var require_satisfies = __commonJS({
|
|
|
3666
3759
|
}
|
|
3667
3760
|
});
|
|
3668
3761
|
|
|
3669
|
-
// ../../node_modules/.pnpm/sharp@0.34.
|
|
3762
|
+
// ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/package.json
|
|
3670
3763
|
var require_package = __commonJS({
|
|
3671
|
-
"../../node_modules/.pnpm/sharp@0.34.
|
|
3764
|
+
"../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/package.json"(exports2, module2) {
|
|
3672
3765
|
module2.exports = {
|
|
3673
3766
|
name: "sharp",
|
|
3674
3767
|
description: "High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",
|
|
3675
|
-
version: "0.34.
|
|
3768
|
+
version: "0.34.5",
|
|
3676
3769
|
author: "Lovell Fuller <npm@lovell.info>",
|
|
3677
3770
|
homepage: "https://sharp.pixelplumbing.com",
|
|
3678
3771
|
contributors: [
|
|
@@ -3763,15 +3856,18 @@ var require_package = __commonJS({
|
|
|
3763
3856
|
"Don Denton <don@happycollision.com>"
|
|
3764
3857
|
],
|
|
3765
3858
|
scripts: {
|
|
3766
|
-
|
|
3859
|
+
build: "node install/build.js",
|
|
3860
|
+
install: "node install/check.js || npm run build",
|
|
3767
3861
|
clean: "rm -rf src/build/ .nyc_output/ coverage/ test/fixtures/output.*",
|
|
3768
|
-
test: "npm run
|
|
3769
|
-
|
|
3770
|
-
"
|
|
3771
|
-
"
|
|
3862
|
+
test: "npm run lint && npm run test-unit",
|
|
3863
|
+
lint: "npm run lint-cpp && npm run lint-js && npm run lint-types",
|
|
3864
|
+
"lint-cpp": "cpplint --quiet src/*.h src/*.cc",
|
|
3865
|
+
"lint-js": "biome lint",
|
|
3866
|
+
"lint-types": "tsd --files ./test/types/sharp.test-d.ts",
|
|
3772
3867
|
"test-leak": "./test/leak/leak.sh",
|
|
3773
|
-
"test-
|
|
3868
|
+
"test-unit": "node --experimental-test-coverage test/unit.mjs",
|
|
3774
3869
|
"package-from-local-build": "node npm/from-local-build.js",
|
|
3870
|
+
"package-release-notes": "node npm/release-notes.js",
|
|
3775
3871
|
"docs-build": "node docs/build.mjs",
|
|
3776
3872
|
"docs-serve": "cd docs && npm start",
|
|
3777
3873
|
"docs-publish": "cd docs && npm run build && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp"
|
|
@@ -3807,93 +3903,73 @@ var require_package = __commonJS({
|
|
|
3807
3903
|
"vips"
|
|
3808
3904
|
],
|
|
3809
3905
|
dependencies: {
|
|
3810
|
-
|
|
3811
|
-
"detect-libc": "^2.
|
|
3812
|
-
semver: "^7.7.
|
|
3906
|
+
"@img/colour": "^1.0.0",
|
|
3907
|
+
"detect-libc": "^2.1.2",
|
|
3908
|
+
semver: "^7.7.3"
|
|
3813
3909
|
},
|
|
3814
3910
|
optionalDependencies: {
|
|
3815
|
-
"@img/sharp-darwin-arm64": "0.34.
|
|
3816
|
-
"@img/sharp-darwin-x64": "0.34.
|
|
3817
|
-
"@img/sharp-libvips-darwin-arm64": "1.2.
|
|
3818
|
-
"@img/sharp-libvips-darwin-x64": "1.2.
|
|
3819
|
-
"@img/sharp-libvips-linux-arm": "1.2.
|
|
3820
|
-
"@img/sharp-libvips-linux-arm64": "1.2.
|
|
3821
|
-
"@img/sharp-libvips-linux-ppc64": "1.2.
|
|
3822
|
-
"@img/sharp-libvips-linux-
|
|
3823
|
-
"@img/sharp-libvips-linux-
|
|
3824
|
-
"@img/sharp-libvips-
|
|
3825
|
-
"@img/sharp-libvips-linuxmusl-
|
|
3826
|
-
"@img/sharp-
|
|
3827
|
-
"@img/sharp-linux-
|
|
3828
|
-
"@img/sharp-linux-
|
|
3829
|
-
"@img/sharp-linux-
|
|
3830
|
-
"@img/sharp-linux-
|
|
3831
|
-
"@img/sharp-
|
|
3832
|
-
"@img/sharp-
|
|
3833
|
-
"@img/sharp-
|
|
3834
|
-
"@img/sharp-
|
|
3835
|
-
"@img/sharp-
|
|
3836
|
-
"@img/sharp-win32-
|
|
3911
|
+
"@img/sharp-darwin-arm64": "0.34.5",
|
|
3912
|
+
"@img/sharp-darwin-x64": "0.34.5",
|
|
3913
|
+
"@img/sharp-libvips-darwin-arm64": "1.2.4",
|
|
3914
|
+
"@img/sharp-libvips-darwin-x64": "1.2.4",
|
|
3915
|
+
"@img/sharp-libvips-linux-arm": "1.2.4",
|
|
3916
|
+
"@img/sharp-libvips-linux-arm64": "1.2.4",
|
|
3917
|
+
"@img/sharp-libvips-linux-ppc64": "1.2.4",
|
|
3918
|
+
"@img/sharp-libvips-linux-riscv64": "1.2.4",
|
|
3919
|
+
"@img/sharp-libvips-linux-s390x": "1.2.4",
|
|
3920
|
+
"@img/sharp-libvips-linux-x64": "1.2.4",
|
|
3921
|
+
"@img/sharp-libvips-linuxmusl-arm64": "1.2.4",
|
|
3922
|
+
"@img/sharp-libvips-linuxmusl-x64": "1.2.4",
|
|
3923
|
+
"@img/sharp-linux-arm": "0.34.5",
|
|
3924
|
+
"@img/sharp-linux-arm64": "0.34.5",
|
|
3925
|
+
"@img/sharp-linux-ppc64": "0.34.5",
|
|
3926
|
+
"@img/sharp-linux-riscv64": "0.34.5",
|
|
3927
|
+
"@img/sharp-linux-s390x": "0.34.5",
|
|
3928
|
+
"@img/sharp-linux-x64": "0.34.5",
|
|
3929
|
+
"@img/sharp-linuxmusl-arm64": "0.34.5",
|
|
3930
|
+
"@img/sharp-linuxmusl-x64": "0.34.5",
|
|
3931
|
+
"@img/sharp-wasm32": "0.34.5",
|
|
3932
|
+
"@img/sharp-win32-arm64": "0.34.5",
|
|
3933
|
+
"@img/sharp-win32-ia32": "0.34.5",
|
|
3934
|
+
"@img/sharp-win32-x64": "0.34.5"
|
|
3837
3935
|
},
|
|
3838
3936
|
devDependencies: {
|
|
3839
|
-
"@
|
|
3840
|
-
"@
|
|
3841
|
-
"@
|
|
3842
|
-
"@img/sharp-libvips-
|
|
3843
|
-
"@img/sharp-libvips-
|
|
3844
|
-
"@img/sharp-libvips-win32-
|
|
3937
|
+
"@biomejs/biome": "^2.3.4",
|
|
3938
|
+
"@cpplint/cli": "^0.1.0",
|
|
3939
|
+
"@emnapi/runtime": "^1.7.0",
|
|
3940
|
+
"@img/sharp-libvips-dev": "1.2.4",
|
|
3941
|
+
"@img/sharp-libvips-dev-wasm32": "1.2.4",
|
|
3942
|
+
"@img/sharp-libvips-win32-arm64": "1.2.4",
|
|
3943
|
+
"@img/sharp-libvips-win32-ia32": "1.2.4",
|
|
3944
|
+
"@img/sharp-libvips-win32-x64": "1.2.4",
|
|
3845
3945
|
"@types/node": "*",
|
|
3846
|
-
|
|
3847
|
-
emnapi: "^1.4.4",
|
|
3946
|
+
emnapi: "^1.7.0",
|
|
3848
3947
|
"exif-reader": "^2.0.2",
|
|
3849
3948
|
"extract-zip": "^2.0.1",
|
|
3850
3949
|
icc: "^3.0.0",
|
|
3851
|
-
"jsdoc-to-markdown": "^9.1.
|
|
3852
|
-
"
|
|
3853
|
-
|
|
3854
|
-
"
|
|
3855
|
-
|
|
3856
|
-
nyc: "^17.1.0",
|
|
3857
|
-
semistandard: "^17.0.0",
|
|
3858
|
-
"tar-fs": "^3.1.0",
|
|
3859
|
-
tsd: "^0.32.0"
|
|
3950
|
+
"jsdoc-to-markdown": "^9.1.3",
|
|
3951
|
+
"node-addon-api": "^8.5.0",
|
|
3952
|
+
"node-gyp": "^11.5.0",
|
|
3953
|
+
"tar-fs": "^3.1.1",
|
|
3954
|
+
tsd: "^0.33.0"
|
|
3860
3955
|
},
|
|
3861
3956
|
license: "Apache-2.0",
|
|
3862
3957
|
engines: {
|
|
3863
3958
|
node: "^18.17.0 || ^20.3.0 || >=21.0.0"
|
|
3864
3959
|
},
|
|
3865
3960
|
config: {
|
|
3866
|
-
libvips: ">=8.17.
|
|
3961
|
+
libvips: ">=8.17.3"
|
|
3867
3962
|
},
|
|
3868
3963
|
funding: {
|
|
3869
3964
|
url: "https://opencollective.com/libvips"
|
|
3870
|
-
},
|
|
3871
|
-
semistandard: {
|
|
3872
|
-
env: [
|
|
3873
|
-
"mocha"
|
|
3874
|
-
]
|
|
3875
|
-
},
|
|
3876
|
-
cc: {
|
|
3877
|
-
linelength: "120",
|
|
3878
|
-
filter: [
|
|
3879
|
-
"build/include"
|
|
3880
|
-
]
|
|
3881
|
-
},
|
|
3882
|
-
nyc: {
|
|
3883
|
-
include: [
|
|
3884
|
-
"lib"
|
|
3885
|
-
]
|
|
3886
|
-
},
|
|
3887
|
-
tsd: {
|
|
3888
|
-
directory: "test/types/"
|
|
3889
3965
|
}
|
|
3890
3966
|
};
|
|
3891
3967
|
}
|
|
3892
3968
|
});
|
|
3893
3969
|
|
|
3894
|
-
// ../../node_modules/.pnpm/sharp@0.34.
|
|
3970
|
+
// ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/libvips.js
|
|
3895
3971
|
var require_libvips = __commonJS({
|
|
3896
|
-
"../../node_modules/.pnpm/sharp@0.34.
|
|
3972
|
+
"../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/libvips.js"(exports2, module2) {
|
|
3897
3973
|
"use strict";
|
|
3898
3974
|
var { spawnSync } = require("child_process");
|
|
3899
3975
|
var { createHash } = require("crypto");
|
|
@@ -3902,8 +3978,7 @@ var require_libvips = __commonJS({
|
|
|
3902
3978
|
var semverSatisfies = require_satisfies();
|
|
3903
3979
|
var detectLibc = require_detect_libc();
|
|
3904
3980
|
var { config, engines, optionalDependencies } = require_package();
|
|
3905
|
-
var minimumLibvipsVersionLabelled = process.env.npm_package_config_libvips ||
|
|
3906
|
-
config.libvips;
|
|
3981
|
+
var minimumLibvipsVersionLabelled = process.env.npm_package_config_libvips || config.libvips;
|
|
3907
3982
|
var minimumLibvipsVersion = semverCoerce(minimumLibvipsVersionLabelled).version;
|
|
3908
3983
|
var prebuiltPlatforms = [
|
|
3909
3984
|
"darwin-arm64",
|
|
@@ -3911,6 +3986,7 @@ var require_libvips = __commonJS({
|
|
|
3911
3986
|
"linux-arm",
|
|
3912
3987
|
"linux-arm64",
|
|
3913
3988
|
"linux-ppc64",
|
|
3989
|
+
"linux-riscv64",
|
|
3914
3990
|
"linux-s390x",
|
|
3915
3991
|
"linux-x64",
|
|
3916
3992
|
"linuxmusl-arm64",
|
|
@@ -3978,7 +4054,7 @@ var require_libvips = __commonJS({
|
|
|
3978
4054
|
};
|
|
3979
4055
|
var isEmscripten = () => {
|
|
3980
4056
|
const { CC } = process.env;
|
|
3981
|
-
return Boolean(CC
|
|
4057
|
+
return Boolean(CC?.endsWith("/emcc"));
|
|
3982
4058
|
};
|
|
3983
4059
|
var isRosetta = () => {
|
|
3984
4060
|
if (process.platform === "darwin" && process.arch === "x64") {
|
|
@@ -4052,8 +4128,7 @@ var require_libvips = __commonJS({
|
|
|
4052
4128
|
return skipSearch(false, "Rosetta", logger);
|
|
4053
4129
|
}
|
|
4054
4130
|
const globalVipsVersion = globalLibvipsVersion();
|
|
4055
|
-
return !!globalVipsVersion &&
|
|
4056
|
-
semverGreaterThanOrEqualTo(globalVipsVersion, minimumLibvipsVersion);
|
|
4131
|
+
return !!globalVipsVersion && semverGreaterThanOrEqualTo(globalVipsVersion, minimumLibvipsVersion);
|
|
4057
4132
|
};
|
|
4058
4133
|
module2.exports = {
|
|
4059
4134
|
minimumLibvipsVersion,
|
|
@@ -4074,9 +4149,9 @@ var require_libvips = __commonJS({
|
|
|
4074
4149
|
}
|
|
4075
4150
|
});
|
|
4076
4151
|
|
|
4077
|
-
// ../../node_modules/.pnpm/sharp@0.34.
|
|
4152
|
+
// ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/sharp.js
|
|
4078
4153
|
var require_sharp = __commonJS({
|
|
4079
|
-
"../../node_modules/.pnpm/sharp@0.34.
|
|
4154
|
+
"../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/sharp.js"(exports2, module2) {
|
|
4080
4155
|
"use strict";
|
|
4081
4156
|
var { familySync, versionSync } = require_detect_libc();
|
|
4082
4157
|
var { runtimePlatformArch, isUnsupportedNodeRuntime, prebuiltPlatforms, minimumLibvipsVersion } = require_libvips();
|
|
@@ -4152,7 +4227,7 @@ var require_sharp = __commonJS({
|
|
|
4152
4227
|
` Found ${libcFound}`,
|
|
4153
4228
|
` Requires ${libcRequires}`
|
|
4154
4229
|
);
|
|
4155
|
-
} catch (
|
|
4230
|
+
} catch (_errEngines) {
|
|
4156
4231
|
}
|
|
4157
4232
|
}
|
|
4158
4233
|
if (isLinux && /\/snap\/core[0-9]{2}/.test(messages)) {
|
|
@@ -4187,15 +4262,18 @@ var require_sharp = __commonJS({
|
|
|
4187
4262
|
}
|
|
4188
4263
|
});
|
|
4189
4264
|
|
|
4190
|
-
// ../../node_modules/.pnpm/sharp@0.34.
|
|
4265
|
+
// ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/constructor.js
|
|
4191
4266
|
var require_constructor = __commonJS({
|
|
4192
|
-
"../../node_modules/.pnpm/sharp@0.34.
|
|
4267
|
+
"../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/constructor.js"(exports2, module2) {
|
|
4193
4268
|
"use strict";
|
|
4194
4269
|
var util = require("util");
|
|
4195
4270
|
var stream = require("stream");
|
|
4196
4271
|
var is = require_is();
|
|
4197
4272
|
require_sharp();
|
|
4198
4273
|
var debuglog = util.debuglog("sharp");
|
|
4274
|
+
var queueListener = (queueLength) => {
|
|
4275
|
+
Sharp.queue.emit("change", queueLength);
|
|
4276
|
+
};
|
|
4199
4277
|
var Sharp = function(input, options) {
|
|
4200
4278
|
if (arguments.length === 1 && !is.defined(input)) {
|
|
4201
4279
|
throw new Error("Invalid input");
|
|
@@ -4222,7 +4300,8 @@ var require_constructor = __commonJS({
|
|
|
4222
4300
|
angle: 0,
|
|
4223
4301
|
rotationAngle: 0,
|
|
4224
4302
|
rotationBackground: [0, 0, 0, 255],
|
|
4225
|
-
|
|
4303
|
+
rotateBefore: false,
|
|
4304
|
+
orientBefore: false,
|
|
4226
4305
|
flip: false,
|
|
4227
4306
|
flop: false,
|
|
4228
4307
|
extendTop: 0,
|
|
@@ -4344,6 +4423,7 @@ var require_constructor = __commonJS({
|
|
|
4344
4423
|
gifProgressive: false,
|
|
4345
4424
|
tiffQuality: 80,
|
|
4346
4425
|
tiffCompression: "jpeg",
|
|
4426
|
+
tiffBigtiff: false,
|
|
4347
4427
|
tiffPredictor: "horizontal",
|
|
4348
4428
|
tiffPyramid: false,
|
|
4349
4429
|
tiffMiniswhite: false,
|
|
@@ -4387,9 +4467,7 @@ var require_constructor = __commonJS({
|
|
|
4387
4467
|
debuglog(warning);
|
|
4388
4468
|
},
|
|
4389
4469
|
// Function to notify of queue length changes
|
|
4390
|
-
queueListener
|
|
4391
|
-
Sharp.queue.emit("change", queueLength);
|
|
4392
|
-
}
|
|
4470
|
+
queueListener
|
|
4393
4471
|
};
|
|
4394
4472
|
this.options.input = this._createInputDescriptor(input, options, { allowStream: true });
|
|
4395
4473
|
return this;
|
|
@@ -4398,10 +4476,10 @@ var require_constructor = __commonJS({
|
|
|
4398
4476
|
Object.setPrototypeOf(Sharp, stream.Duplex);
|
|
4399
4477
|
function clone() {
|
|
4400
4478
|
const clone2 = this.constructor.call();
|
|
4401
|
-
const { debuglog: debuglog2, queueListener, ...options } = this.options;
|
|
4479
|
+
const { debuglog: debuglog2, queueListener: queueListener2, ...options } = this.options;
|
|
4402
4480
|
clone2.options = structuredClone(options);
|
|
4403
4481
|
clone2.options.debuglog = debuglog2;
|
|
4404
|
-
clone2.options.queueListener =
|
|
4482
|
+
clone2.options.queueListener = queueListener2;
|
|
4405
4483
|
if (this._isStreamInput()) {
|
|
4406
4484
|
this.on("finish", () => {
|
|
4407
4485
|
this._flattenBufferIn();
|
|
@@ -4416,9 +4494,9 @@ var require_constructor = __commonJS({
|
|
|
4416
4494
|
}
|
|
4417
4495
|
});
|
|
4418
4496
|
|
|
4419
|
-
// ../../node_modules/.pnpm/sharp@0.34.
|
|
4497
|
+
// ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/input.js
|
|
4420
4498
|
var require_input = __commonJS({
|
|
4421
|
-
"../../node_modules/.pnpm/sharp@0.34.
|
|
4499
|
+
"../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/input.js"(exports2, module2) {
|
|
4422
4500
|
"use strict";
|
|
4423
4501
|
var is = require_is();
|
|
4424
4502
|
var sharp = require_sharp();
|
|
@@ -4466,7 +4544,7 @@ var require_input = __commonJS({
|
|
|
4466
4544
|
const inputDescriptor = {
|
|
4467
4545
|
autoOrient: false,
|
|
4468
4546
|
failOn: "warning",
|
|
4469
|
-
limitInputPixels:
|
|
4547
|
+
limitInputPixels: 16383 ** 2,
|
|
4470
4548
|
ignoreIcc: false,
|
|
4471
4549
|
unlimited: false,
|
|
4472
4550
|
sequentialRead: true
|
|
@@ -4547,7 +4625,7 @@ var require_input = __commonJS({
|
|
|
4547
4625
|
}
|
|
4548
4626
|
if (is.defined(inputOptions.limitInputPixels)) {
|
|
4549
4627
|
if (is.bool(inputOptions.limitInputPixels)) {
|
|
4550
|
-
inputDescriptor.limitInputPixels = inputOptions.limitInputPixels ?
|
|
4628
|
+
inputDescriptor.limitInputPixels = inputOptions.limitInputPixels ? 16383 ** 2 : 0;
|
|
4551
4629
|
} else if (is.integer(inputOptions.limitInputPixels) && is.inRange(inputOptions.limitInputPixels, 0, Number.MAX_SAFE_INTEGER)) {
|
|
4552
4630
|
inputDescriptor.limitInputPixels = inputOptions.limitInputPixels;
|
|
4553
4631
|
} else {
|
|
@@ -4883,11 +4961,11 @@ var require_input = __commonJS({
|
|
|
4883
4961
|
}
|
|
4884
4962
|
}
|
|
4885
4963
|
} else if (is.defined(inputOptions)) {
|
|
4886
|
-
throw new Error(
|
|
4964
|
+
throw new Error(`Invalid input options ${inputOptions}`);
|
|
4887
4965
|
}
|
|
4888
4966
|
return inputDescriptor;
|
|
4889
4967
|
}
|
|
4890
|
-
function _write(chunk,
|
|
4968
|
+
function _write(chunk, _encoding, callback) {
|
|
4891
4969
|
if (Array.isArray(this.options.input.buffer)) {
|
|
4892
4970
|
if (is.buffer(chunk)) {
|
|
4893
4971
|
if (this.options.input.buffer.length === 0) {
|
|
@@ -5019,7 +5097,7 @@ var require_input = __commonJS({
|
|
|
5019
5097
|
}
|
|
5020
5098
|
}
|
|
5021
5099
|
}
|
|
5022
|
-
module2.exports =
|
|
5100
|
+
module2.exports = (Sharp) => {
|
|
5023
5101
|
Object.assign(Sharp.prototype, {
|
|
5024
5102
|
// Private
|
|
5025
5103
|
_inputOptionsFromObject,
|
|
@@ -5036,9 +5114,9 @@ var require_input = __commonJS({
|
|
|
5036
5114
|
}
|
|
5037
5115
|
});
|
|
5038
5116
|
|
|
5039
|
-
// ../../node_modules/.pnpm/sharp@0.34.
|
|
5117
|
+
// ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/resize.js
|
|
5040
5118
|
var require_resize = __commonJS({
|
|
5041
|
-
"../../node_modules/.pnpm/sharp@0.34.
|
|
5119
|
+
"../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/resize.js"(exports2, module2) {
|
|
5042
5120
|
"use strict";
|
|
5043
5121
|
var is = require_is();
|
|
5044
5122
|
var gravity = {
|
|
@@ -5098,7 +5176,7 @@ var require_resize = __commonJS({
|
|
|
5098
5176
|
outside: "min"
|
|
5099
5177
|
};
|
|
5100
5178
|
function isRotationExpected(options) {
|
|
5101
|
-
return options.angle % 360 !== 0 || options.
|
|
5179
|
+
return options.angle % 360 !== 0 || options.rotationAngle !== 0;
|
|
5102
5180
|
}
|
|
5103
5181
|
function isResizeExpected(options) {
|
|
5104
5182
|
return options.width !== -1 || options.height !== -1;
|
|
@@ -5180,7 +5258,7 @@ var require_resize = __commonJS({
|
|
|
5180
5258
|
}
|
|
5181
5259
|
}
|
|
5182
5260
|
if (isRotationExpected(this.options) && isResizeExpected(this.options)) {
|
|
5183
|
-
this.options.
|
|
5261
|
+
this.options.rotateBefore = true;
|
|
5184
5262
|
}
|
|
5185
5263
|
return this;
|
|
5186
5264
|
}
|
|
@@ -5247,9 +5325,12 @@ var require_resize = __commonJS({
|
|
|
5247
5325
|
}, this);
|
|
5248
5326
|
if (isRotationExpected(this.options) && !isResizeExpected(this.options)) {
|
|
5249
5327
|
if (this.options.widthPre === -1 || this.options.widthPost === -1) {
|
|
5250
|
-
this.options.
|
|
5328
|
+
this.options.rotateBefore = true;
|
|
5251
5329
|
}
|
|
5252
5330
|
}
|
|
5331
|
+
if (this.options.input.autoOrient) {
|
|
5332
|
+
this.options.orientBefore = true;
|
|
5333
|
+
}
|
|
5253
5334
|
return this;
|
|
5254
5335
|
}
|
|
5255
5336
|
function trim(options) {
|
|
@@ -5274,11 +5355,11 @@ var require_resize = __commonJS({
|
|
|
5274
5355
|
}
|
|
5275
5356
|
}
|
|
5276
5357
|
if (isRotationExpected(this.options)) {
|
|
5277
|
-
this.options.
|
|
5358
|
+
this.options.rotateBefore = true;
|
|
5278
5359
|
}
|
|
5279
5360
|
return this;
|
|
5280
5361
|
}
|
|
5281
|
-
module2.exports =
|
|
5362
|
+
module2.exports = (Sharp) => {
|
|
5282
5363
|
Object.assign(Sharp.prototype, {
|
|
5283
5364
|
resize,
|
|
5284
5365
|
extend,
|
|
@@ -5294,9 +5375,9 @@ var require_resize = __commonJS({
|
|
|
5294
5375
|
}
|
|
5295
5376
|
});
|
|
5296
5377
|
|
|
5297
|
-
// ../../node_modules/.pnpm/sharp@0.34.
|
|
5378
|
+
// ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/composite.js
|
|
5298
5379
|
var require_composite = __commonJS({
|
|
5299
|
-
"../../node_modules/.pnpm/sharp@0.34.
|
|
5380
|
+
"../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/composite.js"(exports2, module2) {
|
|
5300
5381
|
"use strict";
|
|
5301
5382
|
var is = require_is();
|
|
5302
5383
|
var blend = {
|
|
@@ -5400,16 +5481,16 @@ var require_composite = __commonJS({
|
|
|
5400
5481
|
});
|
|
5401
5482
|
return this;
|
|
5402
5483
|
}
|
|
5403
|
-
module2.exports =
|
|
5484
|
+
module2.exports = (Sharp) => {
|
|
5404
5485
|
Sharp.prototype.composite = composite;
|
|
5405
5486
|
Sharp.blend = blend;
|
|
5406
5487
|
};
|
|
5407
5488
|
}
|
|
5408
5489
|
});
|
|
5409
5490
|
|
|
5410
|
-
// ../../node_modules/.pnpm/sharp@0.34.
|
|
5491
|
+
// ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/operation.js
|
|
5411
5492
|
var require_operation = __commonJS({
|
|
5412
|
-
"../../node_modules/.pnpm/sharp@0.34.
|
|
5493
|
+
"../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/operation.js"(exports2, module2) {
|
|
5413
5494
|
"use strict";
|
|
5414
5495
|
var is = require_is();
|
|
5415
5496
|
var vipsPrecision = {
|
|
@@ -5731,9 +5812,7 @@ var require_operation = __commonJS({
|
|
|
5731
5812
|
throw new Error("Invalid convolution kernel");
|
|
5732
5813
|
}
|
|
5733
5814
|
if (!is.integer(kernel.scale)) {
|
|
5734
|
-
kernel.scale = kernel.kernel.reduce(
|
|
5735
|
-
return a2 + b;
|
|
5736
|
-
}, 0);
|
|
5815
|
+
kernel.scale = kernel.kernel.reduce((a2, b) => a2 + b, 0);
|
|
5737
5816
|
}
|
|
5738
5817
|
if (kernel.scale < 1) {
|
|
5739
5818
|
kernel.scale = 1;
|
|
@@ -5847,7 +5926,7 @@ var require_operation = __commonJS({
|
|
|
5847
5926
|
}
|
|
5848
5927
|
return this;
|
|
5849
5928
|
}
|
|
5850
|
-
module2.exports =
|
|
5929
|
+
module2.exports = (Sharp) => {
|
|
5851
5930
|
Object.assign(Sharp.prototype, {
|
|
5852
5931
|
autoOrient,
|
|
5853
5932
|
rotate,
|
|
@@ -5877,306 +5956,272 @@ var require_operation = __commonJS({
|
|
|
5877
5956
|
}
|
|
5878
5957
|
});
|
|
5879
5958
|
|
|
5880
|
-
// ../../node_modules/.pnpm
|
|
5881
|
-
var
|
|
5882
|
-
"../../node_modules/.pnpm
|
|
5883
|
-
"use strict";
|
|
5884
|
-
module2.exports = {
|
|
5885
|
-
"aliceblue": [240, 248, 255],
|
|
5886
|
-
"antiquewhite": [250, 235, 215],
|
|
5887
|
-
"aqua": [0, 255, 255],
|
|
5888
|
-
"aquamarine": [127, 255, 212],
|
|
5889
|
-
"azure": [240, 255, 255],
|
|
5890
|
-
"beige": [245, 245, 220],
|
|
5891
|
-
"bisque": [255, 228, 196],
|
|
5892
|
-
"black": [0, 0, 0],
|
|
5893
|
-
"blanchedalmond": [255, 235, 205],
|
|
5894
|
-
"blue": [0, 0, 255],
|
|
5895
|
-
"blueviolet": [138, 43, 226],
|
|
5896
|
-
"brown": [165, 42, 42],
|
|
5897
|
-
"burlywood": [222, 184, 135],
|
|
5898
|
-
"cadetblue": [95, 158, 160],
|
|
5899
|
-
"chartreuse": [127, 255, 0],
|
|
5900
|
-
"chocolate": [210, 105, 30],
|
|
5901
|
-
"coral": [255, 127, 80],
|
|
5902
|
-
"cornflowerblue": [100, 149, 237],
|
|
5903
|
-
"cornsilk": [255, 248, 220],
|
|
5904
|
-
"crimson": [220, 20, 60],
|
|
5905
|
-
"cyan": [0, 255, 255],
|
|
5906
|
-
"darkblue": [0, 0, 139],
|
|
5907
|
-
"darkcyan": [0, 139, 139],
|
|
5908
|
-
"darkgoldenrod": [184, 134, 11],
|
|
5909
|
-
"darkgray": [169, 169, 169],
|
|
5910
|
-
"darkgreen": [0, 100, 0],
|
|
5911
|
-
"darkgrey": [169, 169, 169],
|
|
5912
|
-
"darkkhaki": [189, 183, 107],
|
|
5913
|
-
"darkmagenta": [139, 0, 139],
|
|
5914
|
-
"darkolivegreen": [85, 107, 47],
|
|
5915
|
-
"darkorange": [255, 140, 0],
|
|
5916
|
-
"darkorchid": [153, 50, 204],
|
|
5917
|
-
"darkred": [139, 0, 0],
|
|
5918
|
-
"darksalmon": [233, 150, 122],
|
|
5919
|
-
"darkseagreen": [143, 188, 143],
|
|
5920
|
-
"darkslateblue": [72, 61, 139],
|
|
5921
|
-
"darkslategray": [47, 79, 79],
|
|
5922
|
-
"darkslategrey": [47, 79, 79],
|
|
5923
|
-
"darkturquoise": [0, 206, 209],
|
|
5924
|
-
"darkviolet": [148, 0, 211],
|
|
5925
|
-
"deeppink": [255, 20, 147],
|
|
5926
|
-
"deepskyblue": [0, 191, 255],
|
|
5927
|
-
"dimgray": [105, 105, 105],
|
|
5928
|
-
"dimgrey": [105, 105, 105],
|
|
5929
|
-
"dodgerblue": [30, 144, 255],
|
|
5930
|
-
"firebrick": [178, 34, 34],
|
|
5931
|
-
"floralwhite": [255, 250, 240],
|
|
5932
|
-
"forestgreen": [34, 139, 34],
|
|
5933
|
-
"fuchsia": [255, 0, 255],
|
|
5934
|
-
"gainsboro": [220, 220, 220],
|
|
5935
|
-
"ghostwhite": [248, 248, 255],
|
|
5936
|
-
"gold": [255, 215, 0],
|
|
5937
|
-
"goldenrod": [218, 165, 32],
|
|
5938
|
-
"gray": [128, 128, 128],
|
|
5939
|
-
"green": [0, 128, 0],
|
|
5940
|
-
"greenyellow": [173, 255, 47],
|
|
5941
|
-
"grey": [128, 128, 128],
|
|
5942
|
-
"honeydew": [240, 255, 240],
|
|
5943
|
-
"hotpink": [255, 105, 180],
|
|
5944
|
-
"indianred": [205, 92, 92],
|
|
5945
|
-
"indigo": [75, 0, 130],
|
|
5946
|
-
"ivory": [255, 255, 240],
|
|
5947
|
-
"khaki": [240, 230, 140],
|
|
5948
|
-
"lavender": [230, 230, 250],
|
|
5949
|
-
"lavenderblush": [255, 240, 245],
|
|
5950
|
-
"lawngreen": [124, 252, 0],
|
|
5951
|
-
"lemonchiffon": [255, 250, 205],
|
|
5952
|
-
"lightblue": [173, 216, 230],
|
|
5953
|
-
"lightcoral": [240, 128, 128],
|
|
5954
|
-
"lightcyan": [224, 255, 255],
|
|
5955
|
-
"lightgoldenrodyellow": [250, 250, 210],
|
|
5956
|
-
"lightgray": [211, 211, 211],
|
|
5957
|
-
"lightgreen": [144, 238, 144],
|
|
5958
|
-
"lightgrey": [211, 211, 211],
|
|
5959
|
-
"lightpink": [255, 182, 193],
|
|
5960
|
-
"lightsalmon": [255, 160, 122],
|
|
5961
|
-
"lightseagreen": [32, 178, 170],
|
|
5962
|
-
"lightskyblue": [135, 206, 250],
|
|
5963
|
-
"lightslategray": [119, 136, 153],
|
|
5964
|
-
"lightslategrey": [119, 136, 153],
|
|
5965
|
-
"lightsteelblue": [176, 196, 222],
|
|
5966
|
-
"lightyellow": [255, 255, 224],
|
|
5967
|
-
"lime": [0, 255, 0],
|
|
5968
|
-
"limegreen": [50, 205, 50],
|
|
5969
|
-
"linen": [250, 240, 230],
|
|
5970
|
-
"magenta": [255, 0, 255],
|
|
5971
|
-
"maroon": [128, 0, 0],
|
|
5972
|
-
"mediumaquamarine": [102, 205, 170],
|
|
5973
|
-
"mediumblue": [0, 0, 205],
|
|
5974
|
-
"mediumorchid": [186, 85, 211],
|
|
5975
|
-
"mediumpurple": [147, 112, 219],
|
|
5976
|
-
"mediumseagreen": [60, 179, 113],
|
|
5977
|
-
"mediumslateblue": [123, 104, 238],
|
|
5978
|
-
"mediumspringgreen": [0, 250, 154],
|
|
5979
|
-
"mediumturquoise": [72, 209, 204],
|
|
5980
|
-
"mediumvioletred": [199, 21, 133],
|
|
5981
|
-
"midnightblue": [25, 25, 112],
|
|
5982
|
-
"mintcream": [245, 255, 250],
|
|
5983
|
-
"mistyrose": [255, 228, 225],
|
|
5984
|
-
"moccasin": [255, 228, 181],
|
|
5985
|
-
"navajowhite": [255, 222, 173],
|
|
5986
|
-
"navy": [0, 0, 128],
|
|
5987
|
-
"oldlace": [253, 245, 230],
|
|
5988
|
-
"olive": [128, 128, 0],
|
|
5989
|
-
"olivedrab": [107, 142, 35],
|
|
5990
|
-
"orange": [255, 165, 0],
|
|
5991
|
-
"orangered": [255, 69, 0],
|
|
5992
|
-
"orchid": [218, 112, 214],
|
|
5993
|
-
"palegoldenrod": [238, 232, 170],
|
|
5994
|
-
"palegreen": [152, 251, 152],
|
|
5995
|
-
"paleturquoise": [175, 238, 238],
|
|
5996
|
-
"palevioletred": [219, 112, 147],
|
|
5997
|
-
"papayawhip": [255, 239, 213],
|
|
5998
|
-
"peachpuff": [255, 218, 185],
|
|
5999
|
-
"peru": [205, 133, 63],
|
|
6000
|
-
"pink": [255, 192, 203],
|
|
6001
|
-
"plum": [221, 160, 221],
|
|
6002
|
-
"powderblue": [176, 224, 230],
|
|
6003
|
-
"purple": [128, 0, 128],
|
|
6004
|
-
"rebeccapurple": [102, 51, 153],
|
|
6005
|
-
"red": [255, 0, 0],
|
|
6006
|
-
"rosybrown": [188, 143, 143],
|
|
6007
|
-
"royalblue": [65, 105, 225],
|
|
6008
|
-
"saddlebrown": [139, 69, 19],
|
|
6009
|
-
"salmon": [250, 128, 114],
|
|
6010
|
-
"sandybrown": [244, 164, 96],
|
|
6011
|
-
"seagreen": [46, 139, 87],
|
|
6012
|
-
"seashell": [255, 245, 238],
|
|
6013
|
-
"sienna": [160, 82, 45],
|
|
6014
|
-
"silver": [192, 192, 192],
|
|
6015
|
-
"skyblue": [135, 206, 235],
|
|
6016
|
-
"slateblue": [106, 90, 205],
|
|
6017
|
-
"slategray": [112, 128, 144],
|
|
6018
|
-
"slategrey": [112, 128, 144],
|
|
6019
|
-
"snow": [255, 250, 250],
|
|
6020
|
-
"springgreen": [0, 255, 127],
|
|
6021
|
-
"steelblue": [70, 130, 180],
|
|
6022
|
-
"tan": [210, 180, 140],
|
|
6023
|
-
"teal": [0, 128, 128],
|
|
6024
|
-
"thistle": [216, 191, 216],
|
|
6025
|
-
"tomato": [255, 99, 71],
|
|
6026
|
-
"turquoise": [64, 224, 208],
|
|
6027
|
-
"violet": [238, 130, 238],
|
|
6028
|
-
"wheat": [245, 222, 179],
|
|
6029
|
-
"white": [255, 255, 255],
|
|
6030
|
-
"whitesmoke": [245, 245, 245],
|
|
6031
|
-
"yellow": [255, 255, 0],
|
|
6032
|
-
"yellowgreen": [154, 205, 50]
|
|
6033
|
-
};
|
|
6034
|
-
}
|
|
6035
|
-
});
|
|
6036
|
-
|
|
6037
|
-
// ../../node_modules/.pnpm/is-arrayish@0.3.2/node_modules/is-arrayish/index.js
|
|
6038
|
-
var require_is_arrayish = __commonJS({
|
|
6039
|
-
"../../node_modules/.pnpm/is-arrayish@0.3.2/node_modules/is-arrayish/index.js"(exports2, module2) {
|
|
6040
|
-
"use strict";
|
|
6041
|
-
module2.exports = function isArrayish(obj) {
|
|
6042
|
-
if (!obj || typeof obj === "string") {
|
|
6043
|
-
return false;
|
|
6044
|
-
}
|
|
6045
|
-
return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && (obj.splice instanceof Function || Object.getOwnPropertyDescriptor(obj, obj.length - 1) && obj.constructor.name !== "String");
|
|
6046
|
-
};
|
|
6047
|
-
}
|
|
6048
|
-
});
|
|
6049
|
-
|
|
6050
|
-
// ../../node_modules/.pnpm/simple-swizzle@0.2.2/node_modules/simple-swizzle/index.js
|
|
6051
|
-
var require_simple_swizzle = __commonJS({
|
|
6052
|
-
"../../node_modules/.pnpm/simple-swizzle@0.2.2/node_modules/simple-swizzle/index.js"(exports2, module2) {
|
|
5959
|
+
// ../../node_modules/.pnpm/@img+colour@1.0.0/node_modules/@img/colour/color.cjs
|
|
5960
|
+
var require_color = __commonJS({
|
|
5961
|
+
"../../node_modules/.pnpm/@img+colour@1.0.0/node_modules/@img/colour/color.cjs"(exports2, module2) {
|
|
6053
5962
|
"use strict";
|
|
6054
|
-
var
|
|
6055
|
-
var
|
|
6056
|
-
var
|
|
6057
|
-
var
|
|
6058
|
-
|
|
6059
|
-
for (var
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
5963
|
+
var __defProp2 = Object.defineProperty;
|
|
5964
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
5965
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
5966
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
5967
|
+
var __export2 = (target, all) => {
|
|
5968
|
+
for (var name in all)
|
|
5969
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
5970
|
+
};
|
|
5971
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
5972
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
5973
|
+
for (let key of __getOwnPropNames2(from))
|
|
5974
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
5975
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
5976
|
+
}
|
|
5977
|
+
return to;
|
|
5978
|
+
};
|
|
5979
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
5980
|
+
var index_exports = {};
|
|
5981
|
+
__export2(index_exports, {
|
|
5982
|
+
default: () => index_default
|
|
5983
|
+
});
|
|
5984
|
+
module2.exports = __toCommonJS2(index_exports);
|
|
5985
|
+
var color_name_default = {
|
|
5986
|
+
aliceblue: [240, 248, 255],
|
|
5987
|
+
antiquewhite: [250, 235, 215],
|
|
5988
|
+
aqua: [0, 255, 255],
|
|
5989
|
+
aquamarine: [127, 255, 212],
|
|
5990
|
+
azure: [240, 255, 255],
|
|
5991
|
+
beige: [245, 245, 220],
|
|
5992
|
+
bisque: [255, 228, 196],
|
|
5993
|
+
black: [0, 0, 0],
|
|
5994
|
+
blanchedalmond: [255, 235, 205],
|
|
5995
|
+
blue: [0, 0, 255],
|
|
5996
|
+
blueviolet: [138, 43, 226],
|
|
5997
|
+
brown: [165, 42, 42],
|
|
5998
|
+
burlywood: [222, 184, 135],
|
|
5999
|
+
cadetblue: [95, 158, 160],
|
|
6000
|
+
chartreuse: [127, 255, 0],
|
|
6001
|
+
chocolate: [210, 105, 30],
|
|
6002
|
+
coral: [255, 127, 80],
|
|
6003
|
+
cornflowerblue: [100, 149, 237],
|
|
6004
|
+
cornsilk: [255, 248, 220],
|
|
6005
|
+
crimson: [220, 20, 60],
|
|
6006
|
+
cyan: [0, 255, 255],
|
|
6007
|
+
darkblue: [0, 0, 139],
|
|
6008
|
+
darkcyan: [0, 139, 139],
|
|
6009
|
+
darkgoldenrod: [184, 134, 11],
|
|
6010
|
+
darkgray: [169, 169, 169],
|
|
6011
|
+
darkgreen: [0, 100, 0],
|
|
6012
|
+
darkgrey: [169, 169, 169],
|
|
6013
|
+
darkkhaki: [189, 183, 107],
|
|
6014
|
+
darkmagenta: [139, 0, 139],
|
|
6015
|
+
darkolivegreen: [85, 107, 47],
|
|
6016
|
+
darkorange: [255, 140, 0],
|
|
6017
|
+
darkorchid: [153, 50, 204],
|
|
6018
|
+
darkred: [139, 0, 0],
|
|
6019
|
+
darksalmon: [233, 150, 122],
|
|
6020
|
+
darkseagreen: [143, 188, 143],
|
|
6021
|
+
darkslateblue: [72, 61, 139],
|
|
6022
|
+
darkslategray: [47, 79, 79],
|
|
6023
|
+
darkslategrey: [47, 79, 79],
|
|
6024
|
+
darkturquoise: [0, 206, 209],
|
|
6025
|
+
darkviolet: [148, 0, 211],
|
|
6026
|
+
deeppink: [255, 20, 147],
|
|
6027
|
+
deepskyblue: [0, 191, 255],
|
|
6028
|
+
dimgray: [105, 105, 105],
|
|
6029
|
+
dimgrey: [105, 105, 105],
|
|
6030
|
+
dodgerblue: [30, 144, 255],
|
|
6031
|
+
firebrick: [178, 34, 34],
|
|
6032
|
+
floralwhite: [255, 250, 240],
|
|
6033
|
+
forestgreen: [34, 139, 34],
|
|
6034
|
+
fuchsia: [255, 0, 255],
|
|
6035
|
+
gainsboro: [220, 220, 220],
|
|
6036
|
+
ghostwhite: [248, 248, 255],
|
|
6037
|
+
gold: [255, 215, 0],
|
|
6038
|
+
goldenrod: [218, 165, 32],
|
|
6039
|
+
gray: [128, 128, 128],
|
|
6040
|
+
green: [0, 128, 0],
|
|
6041
|
+
greenyellow: [173, 255, 47],
|
|
6042
|
+
grey: [128, 128, 128],
|
|
6043
|
+
honeydew: [240, 255, 240],
|
|
6044
|
+
hotpink: [255, 105, 180],
|
|
6045
|
+
indianred: [205, 92, 92],
|
|
6046
|
+
indigo: [75, 0, 130],
|
|
6047
|
+
ivory: [255, 255, 240],
|
|
6048
|
+
khaki: [240, 230, 140],
|
|
6049
|
+
lavender: [230, 230, 250],
|
|
6050
|
+
lavenderblush: [255, 240, 245],
|
|
6051
|
+
lawngreen: [124, 252, 0],
|
|
6052
|
+
lemonchiffon: [255, 250, 205],
|
|
6053
|
+
lightblue: [173, 216, 230],
|
|
6054
|
+
lightcoral: [240, 128, 128],
|
|
6055
|
+
lightcyan: [224, 255, 255],
|
|
6056
|
+
lightgoldenrodyellow: [250, 250, 210],
|
|
6057
|
+
lightgray: [211, 211, 211],
|
|
6058
|
+
lightgreen: [144, 238, 144],
|
|
6059
|
+
lightgrey: [211, 211, 211],
|
|
6060
|
+
lightpink: [255, 182, 193],
|
|
6061
|
+
lightsalmon: [255, 160, 122],
|
|
6062
|
+
lightseagreen: [32, 178, 170],
|
|
6063
|
+
lightskyblue: [135, 206, 250],
|
|
6064
|
+
lightslategray: [119, 136, 153],
|
|
6065
|
+
lightslategrey: [119, 136, 153],
|
|
6066
|
+
lightsteelblue: [176, 196, 222],
|
|
6067
|
+
lightyellow: [255, 255, 224],
|
|
6068
|
+
lime: [0, 255, 0],
|
|
6069
|
+
limegreen: [50, 205, 50],
|
|
6070
|
+
linen: [250, 240, 230],
|
|
6071
|
+
magenta: [255, 0, 255],
|
|
6072
|
+
maroon: [128, 0, 0],
|
|
6073
|
+
mediumaquamarine: [102, 205, 170],
|
|
6074
|
+
mediumblue: [0, 0, 205],
|
|
6075
|
+
mediumorchid: [186, 85, 211],
|
|
6076
|
+
mediumpurple: [147, 112, 219],
|
|
6077
|
+
mediumseagreen: [60, 179, 113],
|
|
6078
|
+
mediumslateblue: [123, 104, 238],
|
|
6079
|
+
mediumspringgreen: [0, 250, 154],
|
|
6080
|
+
mediumturquoise: [72, 209, 204],
|
|
6081
|
+
mediumvioletred: [199, 21, 133],
|
|
6082
|
+
midnightblue: [25, 25, 112],
|
|
6083
|
+
mintcream: [245, 255, 250],
|
|
6084
|
+
mistyrose: [255, 228, 225],
|
|
6085
|
+
moccasin: [255, 228, 181],
|
|
6086
|
+
navajowhite: [255, 222, 173],
|
|
6087
|
+
navy: [0, 0, 128],
|
|
6088
|
+
oldlace: [253, 245, 230],
|
|
6089
|
+
olive: [128, 128, 0],
|
|
6090
|
+
olivedrab: [107, 142, 35],
|
|
6091
|
+
orange: [255, 165, 0],
|
|
6092
|
+
orangered: [255, 69, 0],
|
|
6093
|
+
orchid: [218, 112, 214],
|
|
6094
|
+
palegoldenrod: [238, 232, 170],
|
|
6095
|
+
palegreen: [152, 251, 152],
|
|
6096
|
+
paleturquoise: [175, 238, 238],
|
|
6097
|
+
palevioletred: [219, 112, 147],
|
|
6098
|
+
papayawhip: [255, 239, 213],
|
|
6099
|
+
peachpuff: [255, 218, 185],
|
|
6100
|
+
peru: [205, 133, 63],
|
|
6101
|
+
pink: [255, 192, 203],
|
|
6102
|
+
plum: [221, 160, 221],
|
|
6103
|
+
powderblue: [176, 224, 230],
|
|
6104
|
+
purple: [128, 0, 128],
|
|
6105
|
+
rebeccapurple: [102, 51, 153],
|
|
6106
|
+
red: [255, 0, 0],
|
|
6107
|
+
rosybrown: [188, 143, 143],
|
|
6108
|
+
royalblue: [65, 105, 225],
|
|
6109
|
+
saddlebrown: [139, 69, 19],
|
|
6110
|
+
salmon: [250, 128, 114],
|
|
6111
|
+
sandybrown: [244, 164, 96],
|
|
6112
|
+
seagreen: [46, 139, 87],
|
|
6113
|
+
seashell: [255, 245, 238],
|
|
6114
|
+
sienna: [160, 82, 45],
|
|
6115
|
+
silver: [192, 192, 192],
|
|
6116
|
+
skyblue: [135, 206, 235],
|
|
6117
|
+
slateblue: [106, 90, 205],
|
|
6118
|
+
slategray: [112, 128, 144],
|
|
6119
|
+
slategrey: [112, 128, 144],
|
|
6120
|
+
snow: [255, 250, 250],
|
|
6121
|
+
springgreen: [0, 255, 127],
|
|
6122
|
+
steelblue: [70, 130, 180],
|
|
6123
|
+
tan: [210, 180, 140],
|
|
6124
|
+
teal: [0, 128, 128],
|
|
6125
|
+
thistle: [216, 191, 216],
|
|
6126
|
+
tomato: [255, 99, 71],
|
|
6127
|
+
turquoise: [64, 224, 208],
|
|
6128
|
+
violet: [238, 130, 238],
|
|
6129
|
+
wheat: [245, 222, 179],
|
|
6130
|
+
white: [255, 255, 255],
|
|
6131
|
+
whitesmoke: [245, 245, 245],
|
|
6132
|
+
yellow: [255, 255, 0],
|
|
6133
|
+
yellowgreen: [154, 205, 50]
|
|
6073
6134
|
};
|
|
6074
|
-
}
|
|
6075
|
-
});
|
|
6076
|
-
|
|
6077
|
-
// ../../node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js
|
|
6078
|
-
var require_color_string = __commonJS({
|
|
6079
|
-
"../../node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js"(exports2, module2) {
|
|
6080
|
-
"use strict";
|
|
6081
|
-
var colorNames = require_color_name();
|
|
6082
|
-
var swizzle = require_simple_swizzle();
|
|
6083
|
-
var hasOwnProperty = Object.hasOwnProperty;
|
|
6084
6135
|
var reverseNames = /* @__PURE__ */ Object.create(null);
|
|
6085
|
-
for (name in
|
|
6086
|
-
if (
|
|
6087
|
-
reverseNames[
|
|
6136
|
+
for (const name in color_name_default) {
|
|
6137
|
+
if (Object.hasOwn(color_name_default, name)) {
|
|
6138
|
+
reverseNames[color_name_default[name]] = name;
|
|
6088
6139
|
}
|
|
6089
6140
|
}
|
|
6090
|
-
var
|
|
6091
|
-
var cs = module2.exports = {
|
|
6141
|
+
var cs = {
|
|
6092
6142
|
to: {},
|
|
6093
6143
|
get: {}
|
|
6094
6144
|
};
|
|
6095
6145
|
cs.get = function(string) {
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6146
|
+
const prefix = string.slice(0, 3).toLowerCase();
|
|
6147
|
+
let value;
|
|
6148
|
+
let model;
|
|
6099
6149
|
switch (prefix) {
|
|
6100
|
-
case "hsl":
|
|
6101
|
-
|
|
6150
|
+
case "hsl": {
|
|
6151
|
+
value = cs.get.hsl(string);
|
|
6102
6152
|
model = "hsl";
|
|
6103
6153
|
break;
|
|
6104
|
-
|
|
6105
|
-
|
|
6154
|
+
}
|
|
6155
|
+
case "hwb": {
|
|
6156
|
+
value = cs.get.hwb(string);
|
|
6106
6157
|
model = "hwb";
|
|
6107
6158
|
break;
|
|
6108
|
-
|
|
6109
|
-
|
|
6159
|
+
}
|
|
6160
|
+
default: {
|
|
6161
|
+
value = cs.get.rgb(string);
|
|
6110
6162
|
model = "rgb";
|
|
6111
6163
|
break;
|
|
6164
|
+
}
|
|
6112
6165
|
}
|
|
6113
|
-
if (!
|
|
6166
|
+
if (!value) {
|
|
6114
6167
|
return null;
|
|
6115
6168
|
}
|
|
6116
|
-
return { model, value
|
|
6169
|
+
return { model, value };
|
|
6117
6170
|
};
|
|
6118
6171
|
cs.get.rgb = function(string) {
|
|
6119
6172
|
if (!string) {
|
|
6120
6173
|
return null;
|
|
6121
6174
|
}
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6175
|
+
const abbr = /^#([a-f\d]{3,4})$/i;
|
|
6176
|
+
const hex = /^#([a-f\d]{6})([a-f\d]{2})?$/i;
|
|
6177
|
+
const rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/;
|
|
6178
|
+
const per = /^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/;
|
|
6179
|
+
const keyword = /^(\w+)$/;
|
|
6180
|
+
let rgb = [0, 0, 0, 1];
|
|
6181
|
+
let match;
|
|
6182
|
+
let i2;
|
|
6183
|
+
let hexAlpha;
|
|
6131
6184
|
if (match = string.match(hex)) {
|
|
6132
6185
|
hexAlpha = match[2];
|
|
6133
6186
|
match = match[1];
|
|
6134
6187
|
for (i2 = 0; i2 < 3; i2++) {
|
|
6135
|
-
|
|
6136
|
-
rgb[i2] = parseInt(match.slice(i22, i22 + 2), 16);
|
|
6188
|
+
const i22 = i2 * 2;
|
|
6189
|
+
rgb[i2] = Number.parseInt(match.slice(i22, i22 + 2), 16);
|
|
6137
6190
|
}
|
|
6138
6191
|
if (hexAlpha) {
|
|
6139
|
-
rgb[3] = parseInt(hexAlpha, 16) / 255;
|
|
6192
|
+
rgb[3] = Number.parseInt(hexAlpha, 16) / 255;
|
|
6140
6193
|
}
|
|
6141
6194
|
} else if (match = string.match(abbr)) {
|
|
6142
6195
|
match = match[1];
|
|
6143
6196
|
hexAlpha = match[3];
|
|
6144
6197
|
for (i2 = 0; i2 < 3; i2++) {
|
|
6145
|
-
rgb[i2] = parseInt(match[i2] + match[i2], 16);
|
|
6198
|
+
rgb[i2] = Number.parseInt(match[i2] + match[i2], 16);
|
|
6146
6199
|
}
|
|
6147
6200
|
if (hexAlpha) {
|
|
6148
|
-
rgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;
|
|
6201
|
+
rgb[3] = Number.parseInt(hexAlpha + hexAlpha, 16) / 255;
|
|
6149
6202
|
}
|
|
6150
6203
|
} else if (match = string.match(rgba)) {
|
|
6151
6204
|
for (i2 = 0; i2 < 3; i2++) {
|
|
6152
|
-
rgb[i2] = parseInt(match[i2 + 1],
|
|
6205
|
+
rgb[i2] = Number.parseInt(match[i2 + 1], 10);
|
|
6153
6206
|
}
|
|
6154
6207
|
if (match[4]) {
|
|
6155
|
-
|
|
6156
|
-
rgb[3] = parseFloat(match[4]) * 0.01;
|
|
6157
|
-
} else {
|
|
6158
|
-
rgb[3] = parseFloat(match[4]);
|
|
6159
|
-
}
|
|
6208
|
+
rgb[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]);
|
|
6160
6209
|
}
|
|
6161
6210
|
} else if (match = string.match(per)) {
|
|
6162
6211
|
for (i2 = 0; i2 < 3; i2++) {
|
|
6163
|
-
rgb[i2] = Math.round(parseFloat(match[i2 + 1]) * 2.55);
|
|
6212
|
+
rgb[i2] = Math.round(Number.parseFloat(match[i2 + 1]) * 2.55);
|
|
6164
6213
|
}
|
|
6165
6214
|
if (match[4]) {
|
|
6166
|
-
|
|
6167
|
-
rgb[3] = parseFloat(match[4]) * 0.01;
|
|
6168
|
-
} else {
|
|
6169
|
-
rgb[3] = parseFloat(match[4]);
|
|
6170
|
-
}
|
|
6215
|
+
rgb[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]);
|
|
6171
6216
|
}
|
|
6172
6217
|
} else if (match = string.match(keyword)) {
|
|
6173
6218
|
if (match[1] === "transparent") {
|
|
6174
6219
|
return [0, 0, 0, 0];
|
|
6175
6220
|
}
|
|
6176
|
-
if (!
|
|
6221
|
+
if (!Object.hasOwn(color_name_default, match[1])) {
|
|
6177
6222
|
return null;
|
|
6178
6223
|
}
|
|
6179
|
-
rgb =
|
|
6224
|
+
rgb = color_name_default[match[1]];
|
|
6180
6225
|
rgb[3] = 1;
|
|
6181
6226
|
return rgb;
|
|
6182
6227
|
} else {
|
|
@@ -6192,14 +6237,14 @@ var require_color_string = __commonJS({
|
|
|
6192
6237
|
if (!string) {
|
|
6193
6238
|
return null;
|
|
6194
6239
|
}
|
|
6195
|
-
|
|
6196
|
-
|
|
6240
|
+
const hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
|
|
6241
|
+
const match = string.match(hsl);
|
|
6197
6242
|
if (match) {
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6243
|
+
const alpha = Number.parseFloat(match[4]);
|
|
6244
|
+
const h2 = (Number.parseFloat(match[1]) % 360 + 360) % 360;
|
|
6245
|
+
const s2 = clamp(Number.parseFloat(match[2]), 0, 100);
|
|
6246
|
+
const l = clamp(Number.parseFloat(match[3]), 0, 100);
|
|
6247
|
+
const a2 = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1);
|
|
6203
6248
|
return [h2, s2, l, a2];
|
|
6204
6249
|
}
|
|
6205
6250
|
return null;
|
|
@@ -6208,66 +6253,54 @@ var require_color_string = __commonJS({
|
|
|
6208
6253
|
if (!string) {
|
|
6209
6254
|
return null;
|
|
6210
6255
|
}
|
|
6211
|
-
|
|
6212
|
-
|
|
6256
|
+
const hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
|
|
6257
|
+
const match = string.match(hwb);
|
|
6213
6258
|
if (match) {
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6259
|
+
const alpha = Number.parseFloat(match[4]);
|
|
6260
|
+
const h2 = (Number.parseFloat(match[1]) % 360 + 360) % 360;
|
|
6261
|
+
const w = clamp(Number.parseFloat(match[2]), 0, 100);
|
|
6262
|
+
const b = clamp(Number.parseFloat(match[3]), 0, 100);
|
|
6263
|
+
const a2 = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1);
|
|
6219
6264
|
return [h2, w, b, a2];
|
|
6220
6265
|
}
|
|
6221
6266
|
return null;
|
|
6222
6267
|
};
|
|
6223
|
-
cs.to.hex = function() {
|
|
6224
|
-
var rgba = swizzle(arguments);
|
|
6268
|
+
cs.to.hex = function(...rgba) {
|
|
6225
6269
|
return "#" + hexDouble(rgba[0]) + hexDouble(rgba[1]) + hexDouble(rgba[2]) + (rgba[3] < 1 ? hexDouble(Math.round(rgba[3] * 255)) : "");
|
|
6226
6270
|
};
|
|
6227
|
-
cs.to.rgb = function() {
|
|
6228
|
-
var rgba = swizzle(arguments);
|
|
6271
|
+
cs.to.rgb = function(...rgba) {
|
|
6229
6272
|
return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ")" : "rgba(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ", " + rgba[3] + ")";
|
|
6230
6273
|
};
|
|
6231
|
-
cs.to.rgb.percent = function() {
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
var b = Math.round(rgba[2] / 255 * 100);
|
|
6274
|
+
cs.to.rgb.percent = function(...rgba) {
|
|
6275
|
+
const r = Math.round(rgba[0] / 255 * 100);
|
|
6276
|
+
const g = Math.round(rgba[1] / 255 * 100);
|
|
6277
|
+
const b = Math.round(rgba[2] / 255 * 100);
|
|
6236
6278
|
return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r + "%, " + g + "%, " + b + "%)" : "rgba(" + r + "%, " + g + "%, " + b + "%, " + rgba[3] + ")";
|
|
6237
6279
|
};
|
|
6238
|
-
cs.to.hsl = function() {
|
|
6239
|
-
var hsla = swizzle(arguments);
|
|
6280
|
+
cs.to.hsl = function(...hsla) {
|
|
6240
6281
|
return hsla.length < 4 || hsla[3] === 1 ? "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)" : "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, " + hsla[3] + ")";
|
|
6241
6282
|
};
|
|
6242
|
-
cs.to.hwb = function() {
|
|
6243
|
-
|
|
6244
|
-
var a2 = "";
|
|
6283
|
+
cs.to.hwb = function(...hwba) {
|
|
6284
|
+
let a2 = "";
|
|
6245
6285
|
if (hwba.length >= 4 && hwba[3] !== 1) {
|
|
6246
6286
|
a2 = ", " + hwba[3];
|
|
6247
6287
|
}
|
|
6248
6288
|
return "hwb(" + hwba[0] + ", " + hwba[1] + "%, " + hwba[2] + "%" + a2 + ")";
|
|
6249
6289
|
};
|
|
6250
|
-
cs.to.keyword = function(rgb) {
|
|
6290
|
+
cs.to.keyword = function(...rgb) {
|
|
6251
6291
|
return reverseNames[rgb.slice(0, 3)];
|
|
6252
6292
|
};
|
|
6253
|
-
function clamp(
|
|
6254
|
-
return Math.min(Math.max(min,
|
|
6293
|
+
function clamp(number_, min, max) {
|
|
6294
|
+
return Math.min(Math.max(min, number_), max);
|
|
6255
6295
|
}
|
|
6256
|
-
function hexDouble(
|
|
6257
|
-
|
|
6258
|
-
return
|
|
6296
|
+
function hexDouble(number_) {
|
|
6297
|
+
const string_ = Math.round(number_).toString(16).toUpperCase();
|
|
6298
|
+
return string_.length < 2 ? "0" + string_ : string_;
|
|
6259
6299
|
}
|
|
6260
|
-
|
|
6261
|
-
});
|
|
6262
|
-
|
|
6263
|
-
// ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js
|
|
6264
|
-
var require_conversions = __commonJS({
|
|
6265
|
-
"../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js"(exports2, module2) {
|
|
6266
|
-
"use strict";
|
|
6267
|
-
var cssKeywords = require_color_name();
|
|
6300
|
+
var color_string_default = cs;
|
|
6268
6301
|
var reverseKeywords = {};
|
|
6269
|
-
for (const key of Object.keys(
|
|
6270
|
-
reverseKeywords[
|
|
6302
|
+
for (const key of Object.keys(color_name_default)) {
|
|
6303
|
+
reverseKeywords[color_name_default[key]] = key;
|
|
6271
6304
|
}
|
|
6272
6305
|
var convert = {
|
|
6273
6306
|
rgb: { channels: 3, labels: "rgb" },
|
|
@@ -6277,7 +6310,9 @@ var require_conversions = __commonJS({
|
|
|
6277
6310
|
cmyk: { channels: 4, labels: "cmyk" },
|
|
6278
6311
|
xyz: { channels: 3, labels: "xyz" },
|
|
6279
6312
|
lab: { channels: 3, labels: "lab" },
|
|
6313
|
+
oklab: { channels: 3, labels: ["okl", "oka", "okb"] },
|
|
6280
6314
|
lch: { channels: 3, labels: "lch" },
|
|
6315
|
+
oklch: { channels: 3, labels: ["okl", "okc", "okh"] },
|
|
6281
6316
|
hex: { channels: 1, labels: ["hex"] },
|
|
6282
6317
|
keyword: { channels: 1, labels: ["keyword"] },
|
|
6283
6318
|
ansi16: { channels: 1, labels: ["ansi16"] },
|
|
@@ -6286,7 +6321,15 @@ var require_conversions = __commonJS({
|
|
|
6286
6321
|
apple: { channels: 3, labels: ["r16", "g16", "b16"] },
|
|
6287
6322
|
gray: { channels: 1, labels: ["gray"] }
|
|
6288
6323
|
};
|
|
6289
|
-
|
|
6324
|
+
var conversions_default = convert;
|
|
6325
|
+
var LAB_FT = (6 / 29) ** 3;
|
|
6326
|
+
function srgbNonlinearTransform(c2) {
|
|
6327
|
+
const cc = c2 > 31308e-7 ? 1.055 * c2 ** (1 / 2.4) - 0.055 : c2 * 12.92;
|
|
6328
|
+
return Math.min(Math.max(0, cc), 1);
|
|
6329
|
+
}
|
|
6330
|
+
function srgbNonlinearTransformInv(c2) {
|
|
6331
|
+
return c2 > 0.04045 ? ((c2 + 0.055) / 1.055) ** 2.4 : c2 / 12.92;
|
|
6332
|
+
}
|
|
6290
6333
|
for (const model of Object.keys(convert)) {
|
|
6291
6334
|
if (!("channels" in convert[model])) {
|
|
6292
6335
|
throw new Error("missing channels property: " + model);
|
|
@@ -6312,14 +6355,23 @@ var require_conversions = __commonJS({
|
|
|
6312
6355
|
const delta = max - min;
|
|
6313
6356
|
let h2;
|
|
6314
6357
|
let s2;
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6358
|
+
switch (max) {
|
|
6359
|
+
case min: {
|
|
6360
|
+
h2 = 0;
|
|
6361
|
+
break;
|
|
6362
|
+
}
|
|
6363
|
+
case r: {
|
|
6364
|
+
h2 = (g - b) / delta;
|
|
6365
|
+
break;
|
|
6366
|
+
}
|
|
6367
|
+
case g: {
|
|
6368
|
+
h2 = 2 + (b - r) / delta;
|
|
6369
|
+
break;
|
|
6370
|
+
}
|
|
6371
|
+
case b: {
|
|
6372
|
+
h2 = 4 + (r - g) / delta;
|
|
6373
|
+
break;
|
|
6374
|
+
}
|
|
6323
6375
|
}
|
|
6324
6376
|
h2 = Math.min(h2 * 60, 360);
|
|
6325
6377
|
if (h2 < 0) {
|
|
@@ -6357,12 +6409,19 @@ var require_conversions = __commonJS({
|
|
|
6357
6409
|
rdif = diffc(r);
|
|
6358
6410
|
gdif = diffc(g);
|
|
6359
6411
|
bdif = diffc(b);
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6412
|
+
switch (v) {
|
|
6413
|
+
case r: {
|
|
6414
|
+
h2 = bdif - gdif;
|
|
6415
|
+
break;
|
|
6416
|
+
}
|
|
6417
|
+
case g: {
|
|
6418
|
+
h2 = 1 / 3 + rdif - bdif;
|
|
6419
|
+
break;
|
|
6420
|
+
}
|
|
6421
|
+
case b: {
|
|
6422
|
+
h2 = 2 / 3 + gdif - rdif;
|
|
6423
|
+
break;
|
|
6424
|
+
}
|
|
6366
6425
|
}
|
|
6367
6426
|
if (h2 < 0) {
|
|
6368
6427
|
h2 += 1;
|
|
@@ -6385,6 +6444,18 @@ var require_conversions = __commonJS({
|
|
|
6385
6444
|
b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
|
|
6386
6445
|
return [h2, w * 100, b * 100];
|
|
6387
6446
|
};
|
|
6447
|
+
convert.rgb.oklab = function(rgb) {
|
|
6448
|
+
const r = srgbNonlinearTransformInv(rgb[0] / 255);
|
|
6449
|
+
const g = srgbNonlinearTransformInv(rgb[1] / 255);
|
|
6450
|
+
const b = srgbNonlinearTransformInv(rgb[2] / 255);
|
|
6451
|
+
const lp = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);
|
|
6452
|
+
const mp = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);
|
|
6453
|
+
const sp = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);
|
|
6454
|
+
const l = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
|
|
6455
|
+
const aa = 1.9779984951 * lp - 2.428592205 * mp + 0.4505937099 * sp;
|
|
6456
|
+
const bb = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
|
|
6457
|
+
return [l * 100, aa * 100, bb * 100];
|
|
6458
|
+
};
|
|
6388
6459
|
convert.rgb.cmyk = function(rgb) {
|
|
6389
6460
|
const r = rgb[0] / 255;
|
|
6390
6461
|
const g = rgb[1] / 255;
|
|
@@ -6403,10 +6474,10 @@ var require_conversions = __commonJS({
|
|
|
6403
6474
|
if (reversed) {
|
|
6404
6475
|
return reversed;
|
|
6405
6476
|
}
|
|
6406
|
-
let currentClosestDistance =
|
|
6477
|
+
let currentClosestDistance = Number.POSITIVE_INFINITY;
|
|
6407
6478
|
let currentClosestKeyword;
|
|
6408
|
-
for (const keyword of Object.keys(
|
|
6409
|
-
const value =
|
|
6479
|
+
for (const keyword of Object.keys(color_name_default)) {
|
|
6480
|
+
const value = color_name_default[keyword];
|
|
6410
6481
|
const distance = comparativeDistance(rgb, value);
|
|
6411
6482
|
if (distance < currentClosestDistance) {
|
|
6412
6483
|
currentClosestDistance = distance;
|
|
@@ -6416,18 +6487,15 @@ var require_conversions = __commonJS({
|
|
|
6416
6487
|
return currentClosestKeyword;
|
|
6417
6488
|
};
|
|
6418
6489
|
convert.keyword.rgb = function(keyword) {
|
|
6419
|
-
return
|
|
6490
|
+
return color_name_default[keyword];
|
|
6420
6491
|
};
|
|
6421
6492
|
convert.rgb.xyz = function(rgb) {
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
|
|
6429
|
-
const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
|
|
6430
|
-
const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
|
|
6493
|
+
const r = srgbNonlinearTransformInv(rgb[0] / 255);
|
|
6494
|
+
const g = srgbNonlinearTransformInv(rgb[1] / 255);
|
|
6495
|
+
const b = srgbNonlinearTransformInv(rgb[2] / 255);
|
|
6496
|
+
const x = r * 0.4124564 + g * 0.3575761 + b * 0.1804375;
|
|
6497
|
+
const y = r * 0.2126729 + g * 0.7151522 + b * 0.072175;
|
|
6498
|
+
const z = r * 0.0193339 + g * 0.119192 + b * 0.9503041;
|
|
6431
6499
|
return [x * 100, y * 100, z * 100];
|
|
6432
6500
|
};
|
|
6433
6501
|
convert.rgb.lab = function(rgb) {
|
|
@@ -6438,9 +6506,9 @@ var require_conversions = __commonJS({
|
|
|
6438
6506
|
x /= 95.047;
|
|
6439
6507
|
y /= 100;
|
|
6440
6508
|
z /= 108.883;
|
|
6441
|
-
x = x >
|
|
6442
|
-
y = y >
|
|
6443
|
-
z = z >
|
|
6509
|
+
x = x > LAB_FT ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
6510
|
+
y = y > LAB_FT ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
6511
|
+
z = z > LAB_FT ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
6444
6512
|
const l = 116 * y - 16;
|
|
6445
6513
|
const a2 = 500 * (x - y);
|
|
6446
6514
|
const b = 200 * (y - z);
|
|
@@ -6450,18 +6518,13 @@ var require_conversions = __commonJS({
|
|
|
6450
6518
|
const h2 = hsl[0] / 360;
|
|
6451
6519
|
const s2 = hsl[1] / 100;
|
|
6452
6520
|
const l = hsl[2] / 100;
|
|
6453
|
-
let t2;
|
|
6454
6521
|
let t3;
|
|
6455
|
-
let
|
|
6522
|
+
let value;
|
|
6456
6523
|
if (s2 === 0) {
|
|
6457
|
-
|
|
6458
|
-
return [
|
|
6459
|
-
}
|
|
6460
|
-
if (l < 0.5) {
|
|
6461
|
-
t2 = l * (1 + s2);
|
|
6462
|
-
} else {
|
|
6463
|
-
t2 = l + s2 - l * s2;
|
|
6524
|
+
value = l * 255;
|
|
6525
|
+
return [value, value, value];
|
|
6464
6526
|
}
|
|
6527
|
+
const t2 = l < 0.5 ? l * (1 + s2) : l + s2 - l * s2;
|
|
6465
6528
|
const t1 = 2 * l - t2;
|
|
6466
6529
|
const rgb = [0, 0, 0];
|
|
6467
6530
|
for (let i2 = 0; i2 < 3; i2++) {
|
|
@@ -6473,15 +6536,15 @@ var require_conversions = __commonJS({
|
|
|
6473
6536
|
t3--;
|
|
6474
6537
|
}
|
|
6475
6538
|
if (6 * t3 < 1) {
|
|
6476
|
-
|
|
6539
|
+
value = t1 + (t2 - t1) * 6 * t3;
|
|
6477
6540
|
} else if (2 * t3 < 1) {
|
|
6478
|
-
|
|
6541
|
+
value = t2;
|
|
6479
6542
|
} else if (3 * t3 < 2) {
|
|
6480
|
-
|
|
6543
|
+
value = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
|
|
6481
6544
|
} else {
|
|
6482
|
-
|
|
6545
|
+
value = t1;
|
|
6483
6546
|
}
|
|
6484
|
-
rgb[i2] =
|
|
6547
|
+
rgb[i2] = value * 255;
|
|
6485
6548
|
}
|
|
6486
6549
|
return rgb;
|
|
6487
6550
|
};
|
|
@@ -6509,18 +6572,24 @@ var require_conversions = __commonJS({
|
|
|
6509
6572
|
const t = 255 * v * (1 - s2 * (1 - f2));
|
|
6510
6573
|
v *= 255;
|
|
6511
6574
|
switch (hi) {
|
|
6512
|
-
case 0:
|
|
6575
|
+
case 0: {
|
|
6513
6576
|
return [v, t, p2];
|
|
6514
|
-
|
|
6577
|
+
}
|
|
6578
|
+
case 1: {
|
|
6515
6579
|
return [q, v, p2];
|
|
6516
|
-
|
|
6580
|
+
}
|
|
6581
|
+
case 2: {
|
|
6517
6582
|
return [p2, v, t];
|
|
6518
|
-
|
|
6583
|
+
}
|
|
6584
|
+
case 3: {
|
|
6519
6585
|
return [p2, q, v];
|
|
6520
|
-
|
|
6586
|
+
}
|
|
6587
|
+
case 4: {
|
|
6521
6588
|
return [t, p2, v];
|
|
6522
|
-
|
|
6589
|
+
}
|
|
6590
|
+
case 5: {
|
|
6523
6591
|
return [v, p2, q];
|
|
6592
|
+
}
|
|
6524
6593
|
}
|
|
6525
6594
|
};
|
|
6526
6595
|
convert.hsv.hsl = function(hsv) {
|
|
@@ -6561,36 +6630,42 @@ var require_conversions = __commonJS({
|
|
|
6561
6630
|
switch (i2) {
|
|
6562
6631
|
default:
|
|
6563
6632
|
case 6:
|
|
6564
|
-
case 0:
|
|
6633
|
+
case 0: {
|
|
6565
6634
|
r = v;
|
|
6566
6635
|
g = n2;
|
|
6567
6636
|
b = wh;
|
|
6568
6637
|
break;
|
|
6569
|
-
|
|
6638
|
+
}
|
|
6639
|
+
case 1: {
|
|
6570
6640
|
r = n2;
|
|
6571
6641
|
g = v;
|
|
6572
6642
|
b = wh;
|
|
6573
6643
|
break;
|
|
6574
|
-
|
|
6644
|
+
}
|
|
6645
|
+
case 2: {
|
|
6575
6646
|
r = wh;
|
|
6576
6647
|
g = v;
|
|
6577
6648
|
b = n2;
|
|
6578
6649
|
break;
|
|
6579
|
-
|
|
6650
|
+
}
|
|
6651
|
+
case 3: {
|
|
6580
6652
|
r = wh;
|
|
6581
6653
|
g = n2;
|
|
6582
6654
|
b = v;
|
|
6583
6655
|
break;
|
|
6584
|
-
|
|
6656
|
+
}
|
|
6657
|
+
case 4: {
|
|
6585
6658
|
r = n2;
|
|
6586
6659
|
g = wh;
|
|
6587
6660
|
b = v;
|
|
6588
6661
|
break;
|
|
6589
|
-
|
|
6662
|
+
}
|
|
6663
|
+
case 5: {
|
|
6590
6664
|
r = v;
|
|
6591
6665
|
g = wh;
|
|
6592
6666
|
b = n2;
|
|
6593
6667
|
break;
|
|
6668
|
+
}
|
|
6594
6669
|
}
|
|
6595
6670
|
return [r * 255, g * 255, b * 255];
|
|
6596
6671
|
};
|
|
@@ -6611,15 +6686,12 @@ var require_conversions = __commonJS({
|
|
|
6611
6686
|
let r;
|
|
6612
6687
|
let g;
|
|
6613
6688
|
let b;
|
|
6614
|
-
r = x * 3.
|
|
6615
|
-
g = x * -0.
|
|
6616
|
-
b = x * 0.
|
|
6617
|
-
r = r
|
|
6618
|
-
g = g
|
|
6619
|
-
b = b
|
|
6620
|
-
r = Math.min(Math.max(0, r), 1);
|
|
6621
|
-
g = Math.min(Math.max(0, g), 1);
|
|
6622
|
-
b = Math.min(Math.max(0, b), 1);
|
|
6689
|
+
r = x * 3.2404542 + y * -1.5371385 + z * -0.4985314;
|
|
6690
|
+
g = x * -0.969266 + y * 1.8760108 + z * 0.041556;
|
|
6691
|
+
b = x * 0.0556434 + y * -0.2040259 + z * 1.0572252;
|
|
6692
|
+
r = srgbNonlinearTransform(r);
|
|
6693
|
+
g = srgbNonlinearTransform(g);
|
|
6694
|
+
b = srgbNonlinearTransform(b);
|
|
6623
6695
|
return [r * 255, g * 255, b * 255];
|
|
6624
6696
|
};
|
|
6625
6697
|
convert.xyz.lab = function(xyz) {
|
|
@@ -6629,14 +6701,56 @@ var require_conversions = __commonJS({
|
|
|
6629
6701
|
x /= 95.047;
|
|
6630
6702
|
y /= 100;
|
|
6631
6703
|
z /= 108.883;
|
|
6632
|
-
x = x >
|
|
6633
|
-
y = y >
|
|
6634
|
-
z = z >
|
|
6704
|
+
x = x > LAB_FT ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
6705
|
+
y = y > LAB_FT ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
6706
|
+
z = z > LAB_FT ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
6635
6707
|
const l = 116 * y - 16;
|
|
6636
6708
|
const a2 = 500 * (x - y);
|
|
6637
6709
|
const b = 200 * (y - z);
|
|
6638
6710
|
return [l, a2, b];
|
|
6639
6711
|
};
|
|
6712
|
+
convert.xyz.oklab = function(xyz) {
|
|
6713
|
+
const x = xyz[0] / 100;
|
|
6714
|
+
const y = xyz[1] / 100;
|
|
6715
|
+
const z = xyz[2] / 100;
|
|
6716
|
+
const lp = Math.cbrt(0.8189330101 * x + 0.3618667424 * y - 0.1288597137 * z);
|
|
6717
|
+
const mp = Math.cbrt(0.0329845436 * x + 0.9293118715 * y + 0.0361456387 * z);
|
|
6718
|
+
const sp = Math.cbrt(0.0482003018 * x + 0.2643662691 * y + 0.633851707 * z);
|
|
6719
|
+
const l = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
|
|
6720
|
+
const a2 = 1.9779984951 * lp - 2.428592205 * mp + 0.4505937099 * sp;
|
|
6721
|
+
const b = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
|
|
6722
|
+
return [l * 100, a2 * 100, b * 100];
|
|
6723
|
+
};
|
|
6724
|
+
convert.oklab.oklch = function(oklab) {
|
|
6725
|
+
return convert.lab.lch(oklab);
|
|
6726
|
+
};
|
|
6727
|
+
convert.oklab.xyz = function(oklab) {
|
|
6728
|
+
const ll = oklab[0] / 100;
|
|
6729
|
+
const a2 = oklab[1] / 100;
|
|
6730
|
+
const b = oklab[2] / 100;
|
|
6731
|
+
const l = (0.999999998 * ll + 0.396337792 * a2 + 0.215803758 * b) ** 3;
|
|
6732
|
+
const m2 = (1.000000008 * ll - 0.105561342 * a2 - 0.063854175 * b) ** 3;
|
|
6733
|
+
const s2 = (1.000000055 * ll - 0.089484182 * a2 - 1.291485538 * b) ** 3;
|
|
6734
|
+
const x = 1.227013851 * l - 0.55779998 * m2 + 0.281256149 * s2;
|
|
6735
|
+
const y = -0.040580178 * l + 1.11225687 * m2 - 0.071676679 * s2;
|
|
6736
|
+
const z = -0.076381285 * l - 0.421481978 * m2 + 1.58616322 * s2;
|
|
6737
|
+
return [x * 100, y * 100, z * 100];
|
|
6738
|
+
};
|
|
6739
|
+
convert.oklab.rgb = function(oklab) {
|
|
6740
|
+
const ll = oklab[0] / 100;
|
|
6741
|
+
const aa = oklab[1] / 100;
|
|
6742
|
+
const bb = oklab[2] / 100;
|
|
6743
|
+
const l = (ll + 0.3963377774 * aa + 0.2158037573 * bb) ** 3;
|
|
6744
|
+
const m2 = (ll - 0.1055613458 * aa - 0.0638541728 * bb) ** 3;
|
|
6745
|
+
const s2 = (ll - 0.0894841775 * aa - 1.291485548 * bb) ** 3;
|
|
6746
|
+
const r = srgbNonlinearTransform(4.0767416621 * l - 3.3077115913 * m2 + 0.2309699292 * s2);
|
|
6747
|
+
const g = srgbNonlinearTransform(-1.2684380046 * l + 2.6097574011 * m2 - 0.3413193965 * s2);
|
|
6748
|
+
const b = srgbNonlinearTransform(-0.0041960863 * l - 0.7034186147 * m2 + 1.707614701 * s2);
|
|
6749
|
+
return [r * 255, g * 255, b * 255];
|
|
6750
|
+
};
|
|
6751
|
+
convert.oklch.oklab = function(oklch) {
|
|
6752
|
+
return convert.lch.lab(oklch);
|
|
6753
|
+
};
|
|
6640
6754
|
convert.lab.xyz = function(lab) {
|
|
6641
6755
|
const l = lab[0];
|
|
6642
6756
|
const a2 = lab[1];
|
|
@@ -6650,9 +6764,9 @@ var require_conversions = __commonJS({
|
|
|
6650
6764
|
const y2 = y ** 3;
|
|
6651
6765
|
const x2 = x ** 3;
|
|
6652
6766
|
const z2 = z ** 3;
|
|
6653
|
-
y = y2 >
|
|
6654
|
-
x = x2 >
|
|
6655
|
-
z = z2 >
|
|
6767
|
+
y = y2 > LAB_FT ? y2 : (y - 16 / 116) / 7.787;
|
|
6768
|
+
x = x2 > LAB_FT ? x2 : (x - 16 / 116) / 7.787;
|
|
6769
|
+
z = z2 > LAB_FT ? z2 : (z - 16 / 116) / 7.787;
|
|
6656
6770
|
x *= 95.047;
|
|
6657
6771
|
y *= 100;
|
|
6658
6772
|
z *= 108.883;
|
|
@@ -6700,7 +6814,7 @@ var require_conversions = __commonJS({
|
|
|
6700
6814
|
const r = args[0];
|
|
6701
6815
|
const g = args[1];
|
|
6702
6816
|
const b = args[2];
|
|
6703
|
-
if (r === g && g === b) {
|
|
6817
|
+
if (r >> 4 === g >> 4 && g >> 4 === b >> 4) {
|
|
6704
6818
|
if (r < 8) {
|
|
6705
6819
|
return 16;
|
|
6706
6820
|
}
|
|
@@ -6713,6 +6827,7 @@ var require_conversions = __commonJS({
|
|
|
6713
6827
|
return ansi;
|
|
6714
6828
|
};
|
|
6715
6829
|
convert.ansi16.rgb = function(args) {
|
|
6830
|
+
args = args[0];
|
|
6716
6831
|
let color = args % 10;
|
|
6717
6832
|
if (color === 0 || color === 7) {
|
|
6718
6833
|
if (args > 50) {
|
|
@@ -6721,13 +6836,14 @@ var require_conversions = __commonJS({
|
|
|
6721
6836
|
color = color / 10.5 * 255;
|
|
6722
6837
|
return [color, color, color];
|
|
6723
6838
|
}
|
|
6724
|
-
const mult = (
|
|
6839
|
+
const mult = (Math.trunc(args > 50) + 1) * 0.5;
|
|
6725
6840
|
const r = (color & 1) * mult * 255;
|
|
6726
6841
|
const g = (color >> 1 & 1) * mult * 255;
|
|
6727
6842
|
const b = (color >> 2 & 1) * mult * 255;
|
|
6728
6843
|
return [r, g, b];
|
|
6729
6844
|
};
|
|
6730
6845
|
convert.ansi256.rgb = function(args) {
|
|
6846
|
+
args = args[0];
|
|
6731
6847
|
if (args >= 232) {
|
|
6732
6848
|
const c2 = (args - 232) * 10 + 8;
|
|
6733
6849
|
return [c2, c2, c2];
|
|
@@ -6742,20 +6858,18 @@ var require_conversions = __commonJS({
|
|
|
6742
6858
|
convert.rgb.hex = function(args) {
|
|
6743
6859
|
const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
|
|
6744
6860
|
const string = integer.toString(16).toUpperCase();
|
|
6745
|
-
return "000000".
|
|
6861
|
+
return "000000".slice(string.length) + string;
|
|
6746
6862
|
};
|
|
6747
6863
|
convert.hex.rgb = function(args) {
|
|
6748
|
-
const match = args.toString(16).match(/[a-
|
|
6864
|
+
const match = args.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);
|
|
6749
6865
|
if (!match) {
|
|
6750
6866
|
return [0, 0, 0];
|
|
6751
6867
|
}
|
|
6752
6868
|
let colorString = match[0];
|
|
6753
6869
|
if (match[0].length === 3) {
|
|
6754
|
-
colorString = colorString.
|
|
6755
|
-
return char + char;
|
|
6756
|
-
}).join("");
|
|
6870
|
+
colorString = [...colorString].map((char) => char + char).join("");
|
|
6757
6871
|
}
|
|
6758
|
-
const integer = parseInt(colorString, 16);
|
|
6872
|
+
const integer = Number.parseInt(colorString, 16);
|
|
6759
6873
|
const r = integer >> 16 & 255;
|
|
6760
6874
|
const g = integer >> 8 & 255;
|
|
6761
6875
|
const b = integer & 255;
|
|
@@ -6768,13 +6882,8 @@ var require_conversions = __commonJS({
|
|
|
6768
6882
|
const max = Math.max(Math.max(r, g), b);
|
|
6769
6883
|
const min = Math.min(Math.min(r, g), b);
|
|
6770
6884
|
const chroma = max - min;
|
|
6771
|
-
let grayscale;
|
|
6772
6885
|
let hue;
|
|
6773
|
-
|
|
6774
|
-
grayscale = min / (1 - chroma);
|
|
6775
|
-
} else {
|
|
6776
|
-
grayscale = 0;
|
|
6777
|
-
}
|
|
6886
|
+
const grayscale = chroma < 1 ? min / (1 - chroma) : 0;
|
|
6778
6887
|
if (chroma <= 0) {
|
|
6779
6888
|
hue = 0;
|
|
6780
6889
|
} else if (max === r) {
|
|
@@ -6821,35 +6930,41 @@ var require_conversions = __commonJS({
|
|
|
6821
6930
|
const w = 1 - v;
|
|
6822
6931
|
let mg = 0;
|
|
6823
6932
|
switch (Math.floor(hi)) {
|
|
6824
|
-
case 0:
|
|
6933
|
+
case 0: {
|
|
6825
6934
|
pure[0] = 1;
|
|
6826
6935
|
pure[1] = v;
|
|
6827
6936
|
pure[2] = 0;
|
|
6828
6937
|
break;
|
|
6829
|
-
|
|
6938
|
+
}
|
|
6939
|
+
case 1: {
|
|
6830
6940
|
pure[0] = w;
|
|
6831
6941
|
pure[1] = 1;
|
|
6832
6942
|
pure[2] = 0;
|
|
6833
6943
|
break;
|
|
6834
|
-
|
|
6944
|
+
}
|
|
6945
|
+
case 2: {
|
|
6835
6946
|
pure[0] = 0;
|
|
6836
6947
|
pure[1] = 1;
|
|
6837
6948
|
pure[2] = v;
|
|
6838
6949
|
break;
|
|
6839
|
-
|
|
6950
|
+
}
|
|
6951
|
+
case 3: {
|
|
6840
6952
|
pure[0] = 0;
|
|
6841
6953
|
pure[1] = w;
|
|
6842
6954
|
pure[2] = 1;
|
|
6843
6955
|
break;
|
|
6844
|
-
|
|
6956
|
+
}
|
|
6957
|
+
case 4: {
|
|
6845
6958
|
pure[0] = v;
|
|
6846
6959
|
pure[1] = 0;
|
|
6847
6960
|
pure[2] = 1;
|
|
6848
6961
|
break;
|
|
6849
|
-
|
|
6962
|
+
}
|
|
6963
|
+
default: {
|
|
6850
6964
|
pure[0] = 1;
|
|
6851
6965
|
pure[1] = 0;
|
|
6852
6966
|
pure[2] = w;
|
|
6967
|
+
}
|
|
6853
6968
|
}
|
|
6854
6969
|
mg = (1 - c2) * g;
|
|
6855
6970
|
return [
|
|
@@ -6920,28 +7035,20 @@ var require_conversions = __commonJS({
|
|
|
6920
7035
|
return [gray[0], 0, 0];
|
|
6921
7036
|
};
|
|
6922
7037
|
convert.gray.hex = function(gray) {
|
|
6923
|
-
const
|
|
6924
|
-
const integer = (
|
|
7038
|
+
const value = Math.round(gray[0] / 100 * 255) & 255;
|
|
7039
|
+
const integer = (value << 16) + (value << 8) + value;
|
|
6925
7040
|
const string = integer.toString(16).toUpperCase();
|
|
6926
|
-
return "000000".
|
|
7041
|
+
return "000000".slice(string.length) + string;
|
|
6927
7042
|
};
|
|
6928
7043
|
convert.rgb.gray = function(rgb) {
|
|
6929
|
-
const
|
|
6930
|
-
return [
|
|
7044
|
+
const value = (rgb[0] + rgb[1] + rgb[2]) / 3;
|
|
7045
|
+
return [value / 255 * 100];
|
|
6931
7046
|
};
|
|
6932
|
-
}
|
|
6933
|
-
});
|
|
6934
|
-
|
|
6935
|
-
// ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js
|
|
6936
|
-
var require_route = __commonJS({
|
|
6937
|
-
"../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js"(exports2, module2) {
|
|
6938
|
-
"use strict";
|
|
6939
|
-
var conversions = require_conversions();
|
|
6940
7047
|
function buildGraph() {
|
|
6941
7048
|
const graph = {};
|
|
6942
|
-
const
|
|
6943
|
-
for (let
|
|
6944
|
-
graph[
|
|
7049
|
+
const models2 = Object.keys(conversions_default);
|
|
7050
|
+
for (let { length } = models2, i2 = 0; i2 < length; i2++) {
|
|
7051
|
+
graph[models2[i2]] = {
|
|
6945
7052
|
// http://jsperf.com/1-vs-infinity
|
|
6946
7053
|
// micro-opt, but this is simple.
|
|
6947
7054
|
distance: -1,
|
|
@@ -6954,10 +7061,10 @@ var require_route = __commonJS({
|
|
|
6954
7061
|
const graph = buildGraph();
|
|
6955
7062
|
const queue = [fromModel];
|
|
6956
7063
|
graph[fromModel].distance = 0;
|
|
6957
|
-
while (queue.length) {
|
|
7064
|
+
while (queue.length > 0) {
|
|
6958
7065
|
const current = queue.pop();
|
|
6959
|
-
const adjacents = Object.keys(
|
|
6960
|
-
for (let
|
|
7066
|
+
const adjacents = Object.keys(conversions_default[current]);
|
|
7067
|
+
for (let { length } = adjacents, i2 = 0; i2 < length; i2++) {
|
|
6961
7068
|
const adjacent = adjacents[i2];
|
|
6962
7069
|
const node = graph[adjacent];
|
|
6963
7070
|
if (node.distance === -1) {
|
|
@@ -6976,22 +7083,22 @@ var require_route = __commonJS({
|
|
|
6976
7083
|
}
|
|
6977
7084
|
function wrapConversion(toModel, graph) {
|
|
6978
7085
|
const path = [graph[toModel].parent, toModel];
|
|
6979
|
-
let fn =
|
|
7086
|
+
let fn = conversions_default[graph[toModel].parent][toModel];
|
|
6980
7087
|
let cur = graph[toModel].parent;
|
|
6981
7088
|
while (graph[cur].parent) {
|
|
6982
7089
|
path.unshift(graph[cur].parent);
|
|
6983
|
-
fn = link(
|
|
7090
|
+
fn = link(conversions_default[graph[cur].parent][cur], fn);
|
|
6984
7091
|
cur = graph[cur].parent;
|
|
6985
7092
|
}
|
|
6986
7093
|
fn.conversion = path;
|
|
6987
7094
|
return fn;
|
|
6988
7095
|
}
|
|
6989
|
-
|
|
7096
|
+
function route(fromModel) {
|
|
6990
7097
|
const graph = deriveBFS(fromModel);
|
|
6991
7098
|
const conversion = {};
|
|
6992
|
-
const
|
|
6993
|
-
for (let
|
|
6994
|
-
const toModel =
|
|
7099
|
+
const models2 = Object.keys(graph);
|
|
7100
|
+
for (let { length } = models2, i2 = 0; i2 < length; i2++) {
|
|
7101
|
+
const toModel = models2[i2];
|
|
6995
7102
|
const node = graph[toModel];
|
|
6996
7103
|
if (node.parent === null) {
|
|
6997
7104
|
continue;
|
|
@@ -6999,18 +7106,10 @@ var require_route = __commonJS({
|
|
|
6999
7106
|
conversion[toModel] = wrapConversion(toModel, graph);
|
|
7000
7107
|
}
|
|
7001
7108
|
return conversion;
|
|
7002
|
-
}
|
|
7003
|
-
|
|
7004
|
-
}
|
|
7005
|
-
|
|
7006
|
-
// ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js
|
|
7007
|
-
var require_color_convert = __commonJS({
|
|
7008
|
-
"../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js"(exports2, module2) {
|
|
7009
|
-
"use strict";
|
|
7010
|
-
var conversions = require_conversions();
|
|
7011
|
-
var route = require_route();
|
|
7012
|
-
var convert = {};
|
|
7013
|
-
var models = Object.keys(conversions);
|
|
7109
|
+
}
|
|
7110
|
+
var route_default = route;
|
|
7111
|
+
var convert2 = {};
|
|
7112
|
+
var models = Object.keys(conversions_default);
|
|
7014
7113
|
function wrapRaw(fn) {
|
|
7015
7114
|
const wrappedFn = function(...args) {
|
|
7016
7115
|
const arg0 = args[0];
|
|
@@ -7038,7 +7137,7 @@ var require_color_convert = __commonJS({
|
|
|
7038
7137
|
}
|
|
7039
7138
|
const result = fn(args);
|
|
7040
7139
|
if (typeof result === "object") {
|
|
7041
|
-
for (let
|
|
7140
|
+
for (let { length } = result, i2 = 0; i2 < length; i2++) {
|
|
7042
7141
|
result[i2] = Math.round(result[i2]);
|
|
7043
7142
|
}
|
|
7044
7143
|
}
|
|
@@ -7049,28 +7148,19 @@ var require_color_convert = __commonJS({
|
|
|
7049
7148
|
}
|
|
7050
7149
|
return wrappedFn;
|
|
7051
7150
|
}
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
Object.defineProperty(
|
|
7055
|
-
Object.defineProperty(
|
|
7056
|
-
const routes =
|
|
7151
|
+
for (const fromModel of models) {
|
|
7152
|
+
convert2[fromModel] = {};
|
|
7153
|
+
Object.defineProperty(convert2[fromModel], "channels", { value: conversions_default[fromModel].channels });
|
|
7154
|
+
Object.defineProperty(convert2[fromModel], "labels", { value: conversions_default[fromModel].labels });
|
|
7155
|
+
const routes = route_default(fromModel);
|
|
7057
7156
|
const routeModels = Object.keys(routes);
|
|
7058
|
-
|
|
7157
|
+
for (const toModel of routeModels) {
|
|
7059
7158
|
const fn = routes[toModel];
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
}
|
|
7063
|
-
}
|
|
7064
|
-
|
|
7065
|
-
}
|
|
7066
|
-
});
|
|
7067
|
-
|
|
7068
|
-
// ../../node_modules/.pnpm/color@4.2.3/node_modules/color/index.js
|
|
7069
|
-
var require_color = __commonJS({
|
|
7070
|
-
"../../node_modules/.pnpm/color@4.2.3/node_modules/color/index.js"(exports2, module2) {
|
|
7071
|
-
"use strict";
|
|
7072
|
-
var colorString = require_color_string();
|
|
7073
|
-
var convert = require_color_convert();
|
|
7159
|
+
convert2[fromModel][toModel] = wrapRounded(fn);
|
|
7160
|
+
convert2[fromModel][toModel].raw = wrapRaw(fn);
|
|
7161
|
+
}
|
|
7162
|
+
}
|
|
7163
|
+
var color_convert_default = convert2;
|
|
7074
7164
|
var skippedModels = [
|
|
7075
7165
|
// To be honest, I don't really feel like keyword belongs in color convert, but eh.
|
|
7076
7166
|
"keyword",
|
|
@@ -7080,8 +7170,8 @@ var require_color = __commonJS({
|
|
|
7080
7170
|
"hex"
|
|
7081
7171
|
];
|
|
7082
7172
|
var hashedModelKeys = {};
|
|
7083
|
-
for (const model of Object.keys(
|
|
7084
|
-
hashedModelKeys[[...
|
|
7173
|
+
for (const model of Object.keys(color_convert_default)) {
|
|
7174
|
+
hashedModelKeys[[...color_convert_default[model].labels].sort().join("")] = model;
|
|
7085
7175
|
}
|
|
7086
7176
|
var limiters = {};
|
|
7087
7177
|
function Color(object, model) {
|
|
@@ -7091,7 +7181,7 @@ var require_color = __commonJS({
|
|
|
7091
7181
|
if (model && model in skippedModels) {
|
|
7092
7182
|
model = null;
|
|
7093
7183
|
}
|
|
7094
|
-
if (model && !(model in
|
|
7184
|
+
if (model && !(model in color_convert_default)) {
|
|
7095
7185
|
throw new Error("Unknown model: " + model);
|
|
7096
7186
|
}
|
|
7097
7187
|
let i2;
|
|
@@ -7105,17 +7195,17 @@ var require_color = __commonJS({
|
|
|
7105
7195
|
this.color = [...object.color];
|
|
7106
7196
|
this.valpha = object.valpha;
|
|
7107
7197
|
} else if (typeof object === "string") {
|
|
7108
|
-
const result =
|
|
7198
|
+
const result = color_string_default.get(object);
|
|
7109
7199
|
if (result === null) {
|
|
7110
7200
|
throw new Error("Unable to parse color from string: " + object);
|
|
7111
7201
|
}
|
|
7112
7202
|
this.model = result.model;
|
|
7113
|
-
channels =
|
|
7203
|
+
channels = color_convert_default[this.model].channels;
|
|
7114
7204
|
this.color = result.value.slice(0, channels);
|
|
7115
7205
|
this.valpha = typeof result.value[channels] === "number" ? result.value[channels] : 1;
|
|
7116
7206
|
} else if (object.length > 0) {
|
|
7117
7207
|
this.model = model || "rgb";
|
|
7118
|
-
channels =
|
|
7208
|
+
channels = color_convert_default[this.model].channels;
|
|
7119
7209
|
const newArray = Array.prototype.slice.call(object, 0, channels);
|
|
7120
7210
|
this.color = zeroArray(newArray, channels);
|
|
7121
7211
|
this.valpha = typeof object[channels] === "number" ? object[channels] : 1;
|
|
@@ -7139,7 +7229,7 @@ var require_color = __commonJS({
|
|
|
7139
7229
|
throw new Error("Unable to parse color from object: " + JSON.stringify(object));
|
|
7140
7230
|
}
|
|
7141
7231
|
this.model = hashedModelKeys[hashedKeys];
|
|
7142
|
-
const { labels } =
|
|
7232
|
+
const { labels } = color_convert_default[this.model];
|
|
7143
7233
|
const color = [];
|
|
7144
7234
|
for (i2 = 0; i2 < labels.length; i2++) {
|
|
7145
7235
|
color.push(object[labels[i2]]);
|
|
@@ -7147,7 +7237,7 @@ var require_color = __commonJS({
|
|
|
7147
7237
|
this.color = zeroArray(color);
|
|
7148
7238
|
}
|
|
7149
7239
|
if (limiters[this.model]) {
|
|
7150
|
-
channels =
|
|
7240
|
+
channels = color_convert_default[this.model].channels;
|
|
7151
7241
|
for (i2 = 0; i2 < channels; i2++) {
|
|
7152
7242
|
const limit = limiters[this.model][i2];
|
|
7153
7243
|
if (limit) {
|
|
@@ -7168,23 +7258,23 @@ var require_color = __commonJS({
|
|
|
7168
7258
|
return this[this.model]();
|
|
7169
7259
|
},
|
|
7170
7260
|
string(places) {
|
|
7171
|
-
let self = this.model in
|
|
7261
|
+
let self = this.model in color_string_default.to ? this : this.rgb();
|
|
7172
7262
|
self = self.round(typeof places === "number" ? places : 1);
|
|
7173
|
-
const
|
|
7174
|
-
return
|
|
7263
|
+
const arguments_ = self.valpha === 1 ? self.color : [...self.color, this.valpha];
|
|
7264
|
+
return color_string_default.to[self.model](...arguments_);
|
|
7175
7265
|
},
|
|
7176
7266
|
percentString(places) {
|
|
7177
7267
|
const self = this.rgb().round(typeof places === "number" ? places : 1);
|
|
7178
|
-
const
|
|
7179
|
-
return
|
|
7268
|
+
const arguments_ = self.valpha === 1 ? self.color : [...self.color, this.valpha];
|
|
7269
|
+
return color_string_default.to.rgb.percent(...arguments_);
|
|
7180
7270
|
},
|
|
7181
7271
|
array() {
|
|
7182
7272
|
return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];
|
|
7183
7273
|
},
|
|
7184
7274
|
object() {
|
|
7185
7275
|
const result = {};
|
|
7186
|
-
const { channels } =
|
|
7187
|
-
const { labels } =
|
|
7276
|
+
const { channels } = color_convert_default[this.model];
|
|
7277
|
+
const { labels } = color_convert_default[this.model];
|
|
7188
7278
|
for (let i2 = 0; i2 < channels; i2++) {
|
|
7189
7279
|
result[labels[i2]] = this.color[i2];
|
|
7190
7280
|
}
|
|
@@ -7250,13 +7340,13 @@ var require_color = __commonJS({
|
|
|
7250
7340
|
if (value !== void 0) {
|
|
7251
7341
|
return new Color(value);
|
|
7252
7342
|
}
|
|
7253
|
-
return
|
|
7343
|
+
return color_convert_default[this.model].keyword(this.color);
|
|
7254
7344
|
},
|
|
7255
7345
|
hex(value) {
|
|
7256
7346
|
if (value !== void 0) {
|
|
7257
7347
|
return new Color(value);
|
|
7258
7348
|
}
|
|
7259
|
-
return
|
|
7349
|
+
return color_string_default.to.hex(...this.rgb().round().color);
|
|
7260
7350
|
},
|
|
7261
7351
|
hexa(value) {
|
|
7262
7352
|
if (value !== void 0) {
|
|
@@ -7267,7 +7357,7 @@ var require_color = __commonJS({
|
|
|
7267
7357
|
if (alphaHex.length === 1) {
|
|
7268
7358
|
alphaHex = "0" + alphaHex;
|
|
7269
7359
|
}
|
|
7270
|
-
return
|
|
7360
|
+
return color_string_default.to.hex(...rgbArray) + alphaHex;
|
|
7271
7361
|
},
|
|
7272
7362
|
rgbNumber() {
|
|
7273
7363
|
const rgb = this.rgb().color;
|
|
@@ -7380,24 +7470,24 @@ var require_color = __commonJS({
|
|
|
7380
7470
|
);
|
|
7381
7471
|
}
|
|
7382
7472
|
};
|
|
7383
|
-
for (const model of Object.keys(
|
|
7473
|
+
for (const model of Object.keys(color_convert_default)) {
|
|
7384
7474
|
if (skippedModels.includes(model)) {
|
|
7385
7475
|
continue;
|
|
7386
7476
|
}
|
|
7387
|
-
const { channels } =
|
|
7388
|
-
Color.prototype[model] = function(...
|
|
7477
|
+
const { channels } = color_convert_default[model];
|
|
7478
|
+
Color.prototype[model] = function(...arguments_) {
|
|
7389
7479
|
if (this.model === model) {
|
|
7390
7480
|
return new Color(this);
|
|
7391
7481
|
}
|
|
7392
|
-
if (
|
|
7393
|
-
return new Color(
|
|
7482
|
+
if (arguments_.length > 0) {
|
|
7483
|
+
return new Color(arguments_, model);
|
|
7394
7484
|
}
|
|
7395
|
-
return new Color([...assertArray(
|
|
7485
|
+
return new Color([...assertArray(color_convert_default[this.model][model].raw(this.color)), this.valpha], model);
|
|
7396
7486
|
};
|
|
7397
|
-
Color[model] = function(...
|
|
7398
|
-
let color =
|
|
7487
|
+
Color[model] = function(...arguments_) {
|
|
7488
|
+
let color = arguments_[0];
|
|
7399
7489
|
if (typeof color === "number") {
|
|
7400
|
-
color = zeroArray(
|
|
7490
|
+
color = zeroArray(arguments_, channels);
|
|
7401
7491
|
}
|
|
7402
7492
|
return new Color(color, model);
|
|
7403
7493
|
};
|
|
@@ -7449,15 +7539,23 @@ var require_color = __commonJS({
|
|
|
7449
7539
|
}
|
|
7450
7540
|
return array;
|
|
7451
7541
|
}
|
|
7452
|
-
|
|
7542
|
+
var index_default = Color;
|
|
7453
7543
|
}
|
|
7454
7544
|
});
|
|
7455
7545
|
|
|
7456
|
-
// ../../node_modules/.pnpm
|
|
7546
|
+
// ../../node_modules/.pnpm/@img+colour@1.0.0/node_modules/@img/colour/index.cjs
|
|
7457
7547
|
var require_colour = __commonJS({
|
|
7458
|
-
"../../node_modules/.pnpm
|
|
7548
|
+
"../../node_modules/.pnpm/@img+colour@1.0.0/node_modules/@img/colour/index.cjs"(exports2, module2) {
|
|
7459
7549
|
"use strict";
|
|
7460
|
-
|
|
7550
|
+
module2.exports = require_color().default;
|
|
7551
|
+
}
|
|
7552
|
+
});
|
|
7553
|
+
|
|
7554
|
+
// ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/colour.js
|
|
7555
|
+
var require_colour2 = __commonJS({
|
|
7556
|
+
"../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/colour.js"(exports2, module2) {
|
|
7557
|
+
"use strict";
|
|
7558
|
+
var color = require_colour();
|
|
7461
7559
|
var is = require_is();
|
|
7462
7560
|
var colourspace = {
|
|
7463
7561
|
multiband: "multiband",
|
|
@@ -7498,7 +7596,7 @@ var require_colour = __commonJS({
|
|
|
7498
7596
|
return this.toColourspace(colorspace);
|
|
7499
7597
|
}
|
|
7500
7598
|
function _getBackgroundColourOption(value) {
|
|
7501
|
-
if (is.object(value) || is.string(value)) {
|
|
7599
|
+
if (is.object(value) || is.string(value) && value.length >= 3 && value.length <= 200) {
|
|
7502
7600
|
const colour = color(value);
|
|
7503
7601
|
return [
|
|
7504
7602
|
colour.red(),
|
|
@@ -7515,7 +7613,7 @@ var require_colour = __commonJS({
|
|
|
7515
7613
|
this.options[key] = _getBackgroundColourOption(value);
|
|
7516
7614
|
}
|
|
7517
7615
|
}
|
|
7518
|
-
module2.exports =
|
|
7616
|
+
module2.exports = (Sharp) => {
|
|
7519
7617
|
Object.assign(Sharp.prototype, {
|
|
7520
7618
|
// Public
|
|
7521
7619
|
tint,
|
|
@@ -7535,9 +7633,9 @@ var require_colour = __commonJS({
|
|
|
7535
7633
|
}
|
|
7536
7634
|
});
|
|
7537
7635
|
|
|
7538
|
-
// ../../node_modules/.pnpm/sharp@0.34.
|
|
7636
|
+
// ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/channel.js
|
|
7539
7637
|
var require_channel = __commonJS({
|
|
7540
|
-
"../../node_modules/.pnpm/sharp@0.34.
|
|
7638
|
+
"../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/channel.js"(exports2, module2) {
|
|
7541
7639
|
"use strict";
|
|
7542
7640
|
var is = require_is();
|
|
7543
7641
|
var bool = {
|
|
@@ -7591,7 +7689,7 @@ var require_channel = __commonJS({
|
|
|
7591
7689
|
}
|
|
7592
7690
|
return this;
|
|
7593
7691
|
}
|
|
7594
|
-
module2.exports =
|
|
7692
|
+
module2.exports = (Sharp) => {
|
|
7595
7693
|
Object.assign(Sharp.prototype, {
|
|
7596
7694
|
// Public instance functions
|
|
7597
7695
|
removeAlpha,
|
|
@@ -7605,9 +7703,9 @@ var require_channel = __commonJS({
|
|
|
7605
7703
|
}
|
|
7606
7704
|
});
|
|
7607
7705
|
|
|
7608
|
-
// ../../node_modules/.pnpm/sharp@0.34.
|
|
7706
|
+
// ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/output.js
|
|
7609
7707
|
var require_output = __commonJS({
|
|
7610
|
-
"../../node_modules/.pnpm/sharp@0.34.
|
|
7708
|
+
"../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/output.js"(exports2, module2) {
|
|
7611
7709
|
"use strict";
|
|
7612
7710
|
var path = require("path");
|
|
7613
7711
|
var is = require_is();
|
|
@@ -8116,6 +8214,9 @@ var require_output = __commonJS({
|
|
|
8116
8214
|
throw is.invalidParameterError("compression", "one of: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k", options.compression);
|
|
8117
8215
|
}
|
|
8118
8216
|
}
|
|
8217
|
+
if (is.defined(options.bigtiff)) {
|
|
8218
|
+
this._setBooleanOption("tiffBigtiff", options.bigtiff);
|
|
8219
|
+
}
|
|
8119
8220
|
if (is.defined(options.predictor)) {
|
|
8120
8221
|
if (is.string(options.predictor) && is.inArray(options.predictor, ["none", "horizontal", "float"])) {
|
|
8121
8222
|
this.options.tiffPredictor = options.predictor;
|
|
@@ -8444,7 +8545,7 @@ var require_output = __commonJS({
|
|
|
8444
8545
|
}
|
|
8445
8546
|
}
|
|
8446
8547
|
}
|
|
8447
|
-
module2.exports =
|
|
8548
|
+
module2.exports = (Sharp) => {
|
|
8448
8549
|
Object.assign(Sharp.prototype, {
|
|
8449
8550
|
// Public
|
|
8450
8551
|
toFile,
|
|
@@ -8481,9 +8582,9 @@ var require_output = __commonJS({
|
|
|
8481
8582
|
}
|
|
8482
8583
|
});
|
|
8483
8584
|
|
|
8484
|
-
// ../../node_modules/.pnpm/sharp@0.34.
|
|
8585
|
+
// ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/utility.js
|
|
8485
8586
|
var require_utility = __commonJS({
|
|
8486
|
-
"../../node_modules/.pnpm/sharp@0.34.
|
|
8587
|
+
"../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/utility.js"(exports2, module2) {
|
|
8487
8588
|
"use strict";
|
|
8488
8589
|
var events = require("events");
|
|
8489
8590
|
var detectLibc = require_detect_libc();
|
|
@@ -8587,7 +8688,7 @@ var require_utility = __commonJS({
|
|
|
8587
8688
|
throw is.invalidParameterError("options", "object", options);
|
|
8588
8689
|
}
|
|
8589
8690
|
}
|
|
8590
|
-
module2.exports =
|
|
8691
|
+
module2.exports = (Sharp) => {
|
|
8591
8692
|
Sharp.cache = cache;
|
|
8592
8693
|
Sharp.concurrency = concurrency;
|
|
8593
8694
|
Sharp.counters = counters;
|
|
@@ -8602,16 +8703,16 @@ var require_utility = __commonJS({
|
|
|
8602
8703
|
}
|
|
8603
8704
|
});
|
|
8604
8705
|
|
|
8605
|
-
// ../../node_modules/.pnpm/sharp@0.34.
|
|
8706
|
+
// ../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/index.js
|
|
8606
8707
|
var require_lib = __commonJS({
|
|
8607
|
-
"../../node_modules/.pnpm/sharp@0.34.
|
|
8708
|
+
"../../node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/lib/index.js"(exports2, module2) {
|
|
8608
8709
|
"use strict";
|
|
8609
8710
|
var Sharp = require_constructor();
|
|
8610
8711
|
require_input()(Sharp);
|
|
8611
8712
|
require_resize()(Sharp);
|
|
8612
8713
|
require_composite()(Sharp);
|
|
8613
8714
|
require_operation()(Sharp);
|
|
8614
|
-
|
|
8715
|
+
require_colour2()(Sharp);
|
|
8615
8716
|
require_channel()(Sharp);
|
|
8616
8717
|
require_output()(Sharp);
|
|
8617
8718
|
require_utility()(Sharp);
|
|
@@ -8619,7 +8720,7 @@ var require_lib = __commonJS({
|
|
|
8619
8720
|
}
|
|
8620
8721
|
});
|
|
8621
8722
|
|
|
8622
|
-
// ../sharp
|
|
8723
|
+
// ../codec-sharp/dist/index.mjs
|
|
8623
8724
|
var dist_exports2 = {};
|
|
8624
8725
|
__export(dist_exports2, {
|
|
8625
8726
|
default: () => f,
|
|
@@ -8644,7 +8745,7 @@ async function n(e, r) {
|
|
|
8644
8745
|
}
|
|
8645
8746
|
var import_sharp, o, f;
|
|
8646
8747
|
var init_dist2 = __esm({
|
|
8647
|
-
"../sharp
|
|
8748
|
+
"../codec-sharp/dist/index.mjs"() {
|
|
8648
8749
|
"use strict";
|
|
8649
8750
|
import_sharp = __toESM(require_lib(), 1);
|
|
8650
8751
|
o = { read: a, write: n };
|
|
@@ -8913,3 +9014,23 @@ async function main() {
|
|
|
8913
9014
|
if (typeof require !== "undefined" && require.main === module) {
|
|
8914
9015
|
main();
|
|
8915
9016
|
}
|
|
9017
|
+
/*! Bundled license information:
|
|
9018
|
+
|
|
9019
|
+
sharp/lib/is.js:
|
|
9020
|
+
sharp/lib/libvips.js:
|
|
9021
|
+
sharp/lib/sharp.js:
|
|
9022
|
+
sharp/lib/constructor.js:
|
|
9023
|
+
sharp/lib/input.js:
|
|
9024
|
+
sharp/lib/resize.js:
|
|
9025
|
+
sharp/lib/composite.js:
|
|
9026
|
+
sharp/lib/operation.js:
|
|
9027
|
+
sharp/lib/colour.js:
|
|
9028
|
+
sharp/lib/channel.js:
|
|
9029
|
+
sharp/lib/output.js:
|
|
9030
|
+
sharp/lib/utility.js:
|
|
9031
|
+
sharp/lib/index.js:
|
|
9032
|
+
(*!
|
|
9033
|
+
Copyright 2013 Lovell Fuller and others.
|
|
9034
|
+
SPDX-License-Identifier: Apache-2.0
|
|
9035
|
+
*)
|
|
9036
|
+
*/
|