UNPKG

@prisma/client

Version:

Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports MySQL, PostgreSQL, MariaDB, SQLite databases.

1,644 lines (1,633 loc) • 882 kB
"use strict"; var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); var __esm = (fn, res) => function __init() { return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; }; var __commonJS = (cb, mod2) => function __require() { return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports; }; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __copyProps( isNodeMode || !mod2 || !mod2.__esModule ? __defProp(target, "default", { value: mod2, enumerable: true }) : target, mod2 )); var __toCommonJS = (mod2) => __copyProps(__defProp({}, "__esModule", { value: true }), mod2); // ../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js var require_ms = __commonJS({ "../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js"(exports, module2) { var s = 1e3; var m = s * 60; var h2 = m * 60; var d2 = h2 * 24; var w2 = d2 * 7; var y2 = d2 * 365.25; module2.exports = function(val, options2) { options2 = options2 || {}; var type = typeof val; if (type === "string" && val.length > 0) { return parse(val); } else if (type === "number" && isFinite(val)) { return options2.long ? fmtLong(val) : fmtShort(val); } throw new Error( "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; function parse(str) { str = String(str); if (str.length > 100) { return; } var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( str ); if (!match) { return; } var n2 = parseFloat(match[1]); var type = (match[2] || "ms").toLowerCase(); switch (type) { case "years": case "year": case "yrs": case "yr": case "y": return n2 * y2; case "weeks": case "week": case "w": return n2 * w2; case "days": case "day": case "d": return n2 * d2; case "hours": case "hour": case "hrs": case "hr": case "h": return n2 * h2; case "minutes": case "minute": case "mins": case "min": case "m": return n2 * m; case "seconds": case "second": case "secs": case "sec": case "s": return n2 * s; case "milliseconds": case "millisecond": case "msecs": case "msec": case "ms": return n2; default: return void 0; } } __name(parse, "parse"); function fmtShort(ms) { var msAbs = Math.abs(ms); if (msAbs >= d2) { return Math.round(ms / d2) + "d"; } if (msAbs >= h2) { return Math.round(ms / h2) + "h"; } if (msAbs >= m) { return Math.round(ms / m) + "m"; } if (msAbs >= s) { return Math.round(ms / s) + "s"; } return ms + "ms"; } __name(fmtShort, "fmtShort"); function fmtLong(ms) { var msAbs = Math.abs(ms); if (msAbs >= d2) { return plural(ms, msAbs, d2, "day"); } if (msAbs >= h2) { return plural(ms, msAbs, h2, "hour"); } if (msAbs >= m) { return plural(ms, msAbs, m, "minute"); } if (msAbs >= s) { return plural(ms, msAbs, s, "second"); } return ms + " ms"; } __name(fmtLong, "fmtLong"); function plural(ms, msAbs, n2, name) { var isPlural = msAbs >= n2 * 1.5; return Math.round(ms / n2) + " " + name + (isPlural ? "s" : ""); } __name(plural, "plural"); } }); // ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js var require_common = __commonJS({ "../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js"(exports, module2) { function setup(env) { createDebug.debug = createDebug; createDebug.default = createDebug; createDebug.coerce = coerce; createDebug.disable = disable; createDebug.enable = enable; createDebug.enabled = enabled; createDebug.humanize = require_ms(); createDebug.destroy = destroy; Object.keys(env).forEach((key) => { createDebug[key] = env[key]; }); createDebug.names = []; createDebug.skips = []; createDebug.formatters = {}; function selectColor(namespace) { let hash = 0; for (let i = 0; i < namespace.length; i++) { hash = (hash << 5) - hash + namespace.charCodeAt(i); hash |= 0; } return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; } __name(selectColor, "selectColor"); createDebug.selectColor = selectColor; function createDebug(namespace) { let prevTime; let enableOverride = null; let namespacesCache; let enabledCache; function debug9(...args) { if (!debug9.enabled) { return; } const self = debug9; const curr = Number(new Date()); const ms = curr - (prevTime || curr); self.diff = ms; self.prev = prevTime; self.curr = curr; prevTime = curr; args[0] = createDebug.coerce(args[0]); if (typeof args[0] !== "string") { args.unshift("%O"); } let index = 0; args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { if (match === "%%") { return "%"; } index++; const formatter = createDebug.formatters[format]; if (typeof formatter === "function") { const val = args[index]; match = formatter.call(self, val); args.splice(index, 1); index--; } return match; }); createDebug.formatArgs.call(self, args); const logFn = self.log || createDebug.log; logFn.apply(self, args); } __name(debug9, "debug"); debug9.namespace = namespace; debug9.useColors = createDebug.useColors(); debug9.color = createDebug.selectColor(namespace); debug9.extend = extend; debug9.destroy = createDebug.destroy; Object.defineProperty(debug9, "enabled", { enumerable: true, configurable: false, get: () => { if (enableOverride !== null) { return enableOverride; } if (namespacesCache !== createDebug.namespaces) { namespacesCache = createDebug.namespaces; enabledCache = createDebug.enabled(namespace); } return enabledCache; }, set: (v) => { enableOverride = v; } }); if (typeof createDebug.init === "function") { createDebug.init(debug9); } return debug9; } __name(createDebug, "createDebug"); function extend(namespace, delimiter) { const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); newDebug.log = this.log; return newDebug; } __name(extend, "extend"); function enable(namespaces) { createDebug.save(namespaces); createDebug.namespaces = namespaces; createDebug.names = []; createDebug.skips = []; let i; const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); const len = split.length; for (i = 0; i < len; i++) { if (!split[i]) { continue; } namespaces = split[i].replace(/\*/g, ".*?"); if (namespaces[0] === "-") { createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$")); } else { createDebug.names.push(new RegExp("^" + namespaces + "$")); } } } __name(enable, "enable"); function disable() { const namespaces = [ ...createDebug.names.map(toNamespace), ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace) ].join(","); createDebug.enable(""); return namespaces; } __name(disable, "disable"); function enabled(name) { if (name[name.length - 1] === "*") { return true; } let i; let len; for (i = 0, len = createDebug.skips.length; i < len; i++) { if (createDebug.skips[i].test(name)) { return false; } } for (i = 0, len = createDebug.names.length; i < len; i++) { if (createDebug.names[i].test(name)) { return true; } } return false; } __name(enabled, "enabled"); function toNamespace(regexp) { return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*"); } __name(toNamespace, "toNamespace"); function coerce(val) { if (val instanceof Error) { return val.stack || val.message; } return val; } __name(coerce, "coerce"); function destroy() { console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); } __name(destroy, "destroy"); createDebug.enable(createDebug.load()); return createDebug; } __name(setup, "setup"); module2.exports = setup; } }); // ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js var require_browser = __commonJS({ "../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js"(exports, module2) { exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.storage = localstorage(); exports.destroy = (() => { let warned = false; return () => { if (!warned) { warned = true; console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); } }; })(); exports.colors = [ "#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33" ]; function useColors() { if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { return true; } if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { return false; } return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); } __name(useColors, "useColors"); function formatArgs(args) { args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); if (!this.useColors) { return; } const c = "color: " + this.color; args.splice(1, 0, c, "color: inherit"); let index = 0; let lastC = 0; args[0].replace(/%[a-zA-Z%]/g, (match) => { if (match === "%%") { return; } index++; if (match === "%c") { lastC = index; } }); args.splice(lastC, 0, c); } __name(formatArgs, "formatArgs"); exports.log = console.debug || console.log || (() => { }); function save(namespaces) { try { if (namespaces) { exports.storage.setItem("debug", namespaces); } else { exports.storage.removeItem("debug"); } } catch (error) { } } __name(save, "save"); function load() { let r2; try { r2 = exports.storage.getItem("debug"); } catch (error) { } if (!r2 && typeof process !== "undefined" && "env" in process) { r2 = process.env.DEBUG; } return r2; } __name(load, "load"); function localstorage() { try { return localStorage; } catch (error) { } } __name(localstorage, "localstorage"); module2.exports = require_common()(exports); var { formatters } = module2.exports; formatters.j = function(v) { try { return JSON.stringify(v); } catch (error) { return "[UnexpectedJSONParseError]: " + error.message; } }; } }); // ../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js var require_has_flag = __commonJS({ "../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module2) { "use strict"; module2.exports = (flag, argv = process.argv) => { const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; const position = argv.indexOf(prefix + flag); const terminatorPosition = argv.indexOf("--"); return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); }; } }); // ../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js var require_supports_color = __commonJS({ "../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module2) { "use strict"; var os2 = require("os"); var tty = require("tty"); var hasFlag = require_has_flag(); var { env } = process; var forceColor; if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { forceColor = 0; } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { forceColor = 1; } if ("FORCE_COLOR" in env) { if (env.FORCE_COLOR === "true") { forceColor = 1; } else if (env.FORCE_COLOR === "false") { forceColor = 0; } else { forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); } } function translateLevel(level) { if (level === 0) { return false; } return { level, hasBasic: true, has256: level >= 2, has16m: level >= 3 }; } __name(translateLevel, "translateLevel"); function supportsColor(haveStream, streamIsTTY) { if (forceColor === 0) { return 0; } if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { return 3; } if (hasFlag("color=256")) { return 2; } if (haveStream && !streamIsTTY && forceColor === void 0) { return 0; } const min2 = forceColor || 0; if (env.TERM === "dumb") { return min2; } if (process.platform === "win32") { const osRelease = os2.release().split("."); if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { return Number(osRelease[2]) >= 14931 ? 3 : 2; } return 1; } if ("CI" in env) { if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign2) => sign2 in env) || env.CI_NAME === "codeship") { return 1; } return min2; } if ("TEAMCITY_VERSION" in env) { return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; } if (env.COLORTERM === "truecolor") { return 3; } if ("TERM_PROGRAM" in env) { const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); switch (env.TERM_PROGRAM) { case "iTerm.app": return version >= 3 ? 3 : 2; case "Apple_Terminal": return 2; } } if (/-256(color)?$/i.test(env.TERM)) { return 2; } if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { return 1; } if ("COLORTERM" in env) { return 1; } return min2; } __name(supportsColor, "supportsColor"); function getSupportLevel(stream2) { const level = supportsColor(stream2, stream2 && stream2.isTTY); return translateLevel(level); } __name(getSupportLevel, "getSupportLevel"); module2.exports = { supportsColor: getSupportLevel, stdout: translateLevel(supportsColor(true, tty.isatty(1))), stderr: translateLevel(supportsColor(true, tty.isatty(2))) }; } }); // ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js var require_node = __commonJS({ "../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js"(exports, module2) { var tty = require("tty"); var util2 = require("util"); exports.init = init; exports.log = log3; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.destroy = util2.deprecate( () => { }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`." ); exports.colors = [6, 2, 3, 4, 5, 1]; try { const supportsColor = require_supports_color(); if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { exports.colors = [ 20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221 ]; } } catch (error) { } exports.inspectOpts = Object.keys(process.env).filter((key) => { return /^debug_/i.test(key); }).reduce((obj, key) => { const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { return k.toUpperCase(); }); let val = process.env[key]; if (/^(yes|on|true|enabled)$/i.test(val)) { val = true; } else if (/^(no|off|false|disabled)$/i.test(val)) { val = false; } else if (val === "null") { val = null; } else { val = Number(val); } obj[prop] = val; return obj; }, {}); function useColors() { return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd); } __name(useColors, "useColors"); function formatArgs(args) { const { namespace: name, useColors: useColors2 } = this; if (useColors2) { const c = this.color; const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c); const prefix = ` ${colorCode};1m${name} \x1B[0m`; args[0] = prefix + args[0].split("\n").join("\n" + prefix); args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m"); } else { args[0] = getDate() + name + " " + args[0]; } } __name(formatArgs, "formatArgs"); function getDate() { if (exports.inspectOpts.hideDate) { return ""; } return new Date().toISOString() + " "; } __name(getDate, "getDate"); function log3(...args) { return process.stderr.write(util2.format(...args) + "\n"); } __name(log3, "log"); function save(namespaces) { if (namespaces) { process.env.DEBUG = namespaces; } else { delete process.env.DEBUG; } } __name(save, "save"); function load() { return process.env.DEBUG; } __name(load, "load"); function init(debug9) { debug9.inspectOpts = {}; const keys = Object.keys(exports.inspectOpts); for (let i = 0; i < keys.length; i++) { debug9.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; } } __name(init, "init"); module2.exports = require_common()(exports); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; return util2.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); }; formatters.O = function(v) { this.inspectOpts.colors = this.useColors; return util2.inspect(v, this.inspectOpts); }; } }); // ../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js var require_src = __commonJS({ "../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js"(exports, module2) { if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { module2.exports = require_browser(); } else { module2.exports = require_node(); } } }); // ../../node_modules/.pnpm/@prisma+engines-version@4.10.0-84.ca7fcef713137fa11029d519a9780db130cca91d/node_modules/@prisma/engines-version/package.json var require_package = __commonJS({ "../../node_modules/.pnpm/@prisma+engines-version@4.10.0-84.ca7fcef713137fa11029d519a9780db130cca91d/node_modules/@prisma/engines-version/package.json"(exports, module2) { module2.exports = { name: "@prisma/engines-version", version: "4.10.0-84.ca7fcef713137fa11029d519a9780db130cca91d", main: "index.js", types: "index.d.ts", license: "Apache-2.0", author: "Tim Suchanek <suchanek@prisma.io>", prisma: { enginesVersion: "ca7fcef713137fa11029d519a9780db130cca91d" }, repository: { type: "git", url: "https://github.com/prisma/engines-wrapper.git", directory: "packages/engines-version" }, devDependencies: { "@types/node": "16.11.64", typescript: "4.8.4" }, files: [ "index.js", "index.d.ts" ], scripts: { build: "tsc -d" } }; } }); // ../../node_modules/.pnpm/@prisma+engines-version@4.10.0-84.ca7fcef713137fa11029d519a9780db130cca91d/node_modules/@prisma/engines-version/index.js var require_engines_version = __commonJS({ "../../node_modules/.pnpm/@prisma+engines-version@4.10.0-84.ca7fcef713137fa11029d519a9780db130cca91d/node_modules/@prisma/engines-version/index.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.enginesVersion = void 0; exports.enginesVersion = require_package().prisma.enginesVersion; } }); // ../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js var require_color_name = __commonJS({ "../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"(exports, module2) { "use strict"; module2.exports = { "aliceblue": [240, 248, 255], "antiquewhite": [250, 235, 215], "aqua": [0, 255, 255], "aquamarine": [127, 255, 212], "azure": [240, 255, 255], "beige": [245, 245, 220], "bisque": [255, 228, 196], "black": [0, 0, 0], "blanchedalmond": [255, 235, 205], "blue": [0, 0, 255], "blueviolet": [138, 43, 226], "brown": [165, 42, 42], "burlywood": [222, 184, 135], "cadetblue": [95, 158, 160], "chartreuse": [127, 255, 0], "chocolate": [210, 105, 30], "coral": [255, 127, 80], "cornflowerblue": [100, 149, 237], "cornsilk": [255, 248, 220], "crimson": [220, 20, 60], "cyan": [0, 255, 255], "darkblue": [0, 0, 139], "darkcyan": [0, 139, 139], "darkgoldenrod": [184, 134, 11], "darkgray": [169, 169, 169], "darkgreen": [0, 100, 0], "darkgrey": [169, 169, 169], "darkkhaki": [189, 183, 107], "darkmagenta": [139, 0, 139], "darkolivegreen": [85, 107, 47], "darkorange": [255, 140, 0], "darkorchid": [153, 50, 204], "darkred": [139, 0, 0], "darksalmon": [233, 150, 122], "darkseagreen": [143, 188, 143], "darkslateblue": [72, 61, 139], "darkslategray": [47, 79, 79], "darkslategrey": [47, 79, 79], "darkturquoise": [0, 206, 209], "darkviolet": [148, 0, 211], "deeppink": [255, 20, 147], "deepskyblue": [0, 191, 255], "dimgray": [105, 105, 105], "dimgrey": [105, 105, 105], "dodgerblue": [30, 144, 255], "firebrick": [178, 34, 34], "floralwhite": [255, 250, 240], "forestgreen": [34, 139, 34], "fuchsia": [255, 0, 255], "gainsboro": [220, 220, 220], "ghostwhite": [248, 248, 255], "gold": [255, 215, 0], "goldenrod": [218, 165, 32], "gray": [128, 128, 128], "green": [0, 128, 0], "greenyellow": [173, 255, 47], "grey": [128, 128, 128], "honeydew": [240, 255, 240], "hotpink": [255, 105, 180], "indianred": [205, 92, 92], "indigo": [75, 0, 130], "ivory": [255, 255, 240], "khaki": [240, 230, 140], "lavender": [230, 230, 250], "lavenderblush": [255, 240, 245], "lawngreen": [124, 252, 0], "lemonchiffon": [255, 250, 205], "lightblue": [173, 216, 230], "lightcoral": [240, 128, 128], "lightcyan": [224, 255, 255], "lightgoldenrodyellow": [250, 250, 210], "lightgray": [211, 211, 211], "lightgreen": [144, 238, 144], "lightgrey": [211, 211, 211], "lightpink": [255, 182, 193], "lightsalmon": [255, 160, 122], "lightseagreen": [32, 178, 170], "lightskyblue": [135, 206, 250], "lightslategray": [119, 136, 153], "lightslategrey": [119, 136, 153], "lightsteelblue": [176, 196, 222], "lightyellow": [255, 255, 224], "lime": [0, 255, 0], "limegreen": [50, 205, 50], "linen": [250, 240, 230], "magenta": [255, 0, 255], "maroon": [128, 0, 0], "mediumaquamarine": [102, 205, 170], "mediumblue": [0, 0, 205], "mediumorchid": [186, 85, 211], "mediumpurple": [147, 112, 219], "mediumseagreen": [60, 179, 113], "mediumslateblue": [123, 104, 238], "mediumspringgreen": [0, 250, 154], "mediumturquoise": [72, 209, 204], "mediumvioletred": [199, 21, 133], "midnightblue": [25, 25, 112], "mintcream": [245, 255, 250], "mistyrose": [255, 228, 225], "moccasin": [255, 228, 181], "navajowhite": [255, 222, 173], "navy": [0, 0, 128], "oldlace": [253, 245, 230], "olive": [128, 128, 0], "olivedrab": [107, 142, 35], "orange": [255, 165, 0], "orangered": [255, 69, 0], "orchid": [218, 112, 214], "palegoldenrod": [238, 232, 170], "palegreen": [152, 251, 152], "paleturquoise": [175, 238, 238], "palevioletred": [219, 112, 147], "papayawhip": [255, 239, 213], "peachpuff": [255, 218, 185], "peru": [205, 133, 63], "pink": [255, 192, 203], "plum": [221, 160, 221], "powderblue": [176, 224, 230], "purple": [128, 0, 128], "rebeccapurple": [102, 51, 153], "red": [255, 0, 0], "rosybrown": [188, 143, 143], "royalblue": [65, 105, 225], "saddlebrown": [139, 69, 19], "salmon": [250, 128, 114], "sandybrown": [244, 164, 96], "seagreen": [46, 139, 87], "seashell": [255, 245, 238], "sienna": [160, 82, 45], "silver": [192, 192, 192], "skyblue": [135, 206, 235], "slateblue": [106, 90, 205], "slategray": [112, 128, 144], "slategrey": [112, 128, 144], "snow": [255, 250, 250], "springgreen": [0, 255, 127], "steelblue": [70, 130, 180], "tan": [210, 180, 140], "teal": [0, 128, 128], "thistle": [216, 191, 216], "tomato": [255, 99, 71], "turquoise": [64, 224, 208], "violet": [238, 130, 238], "wheat": [245, 222, 179], "white": [255, 255, 255], "whitesmoke": [245, 245, 245], "yellow": [255, 255, 0], "yellowgreen": [154, 205, 50] }; } }); // ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js var require_conversions = __commonJS({ "../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js"(exports, module2) { var cssKeywords = require_color_name(); var reverseKeywords = {}; for (const key of Object.keys(cssKeywords)) { reverseKeywords[cssKeywords[key]] = key; } var convert = { rgb: { channels: 3, labels: "rgb" }, hsl: { channels: 3, labels: "hsl" }, hsv: { channels: 3, labels: "hsv" }, hwb: { channels: 3, labels: "hwb" }, cmyk: { channels: 4, labels: "cmyk" }, xyz: { channels: 3, labels: "xyz" }, lab: { channels: 3, labels: "lab" }, lch: { channels: 3, labels: "lch" }, hex: { channels: 1, labels: ["hex"] }, keyword: { channels: 1, labels: ["keyword"] }, ansi16: { channels: 1, labels: ["ansi16"] }, ansi256: { channels: 1, labels: ["ansi256"] }, hcg: { channels: 3, labels: ["h", "c", "g"] }, apple: { channels: 3, labels: ["r16", "g16", "b16"] }, gray: { channels: 1, labels: ["gray"] } }; module2.exports = convert; for (const model of Object.keys(convert)) { if (!("channels" in convert[model])) { throw new Error("missing channels property: " + model); } if (!("labels" in convert[model])) { throw new Error("missing channel labels property: " + model); } if (convert[model].labels.length !== convert[model].channels) { throw new Error("channel and label counts mismatch: " + model); } const { channels, labels } = convert[model]; delete convert[model].channels; delete convert[model].labels; Object.defineProperty(convert[model], "channels", { value: channels }); Object.defineProperty(convert[model], "labels", { value: labels }); } convert.rgb.hsl = function(rgb) { const r2 = rgb[0] / 255; const g2 = rgb[1] / 255; const b2 = rgb[2] / 255; const min2 = Math.min(r2, g2, b2); const max2 = Math.max(r2, g2, b2); const delta = max2 - min2; let h2; let s; if (max2 === min2) { h2 = 0; } else if (r2 === max2) { h2 = (g2 - b2) / delta; } else if (g2 === max2) { h2 = 2 + (b2 - r2) / delta; } else if (b2 === max2) { h2 = 4 + (r2 - g2) / delta; } h2 = Math.min(h2 * 60, 360); if (h2 < 0) { h2 += 360; } const l = (min2 + max2) / 2; if (max2 === min2) { s = 0; } else if (l <= 0.5) { s = delta / (max2 + min2); } else { s = delta / (2 - max2 - min2); } return [h2, s * 100, l * 100]; }; convert.rgb.hsv = function(rgb) { let rdif; let gdif; let bdif; let h2; let s; const r2 = rgb[0] / 255; const g2 = rgb[1] / 255; const b2 = rgb[2] / 255; const v = Math.max(r2, g2, b2); const diff = v - Math.min(r2, g2, b2); const diffc = /* @__PURE__ */ __name(function(c) { return (v - c) / 6 / diff + 1 / 2; }, "diffc"); if (diff === 0) { h2 = 0; s = 0; } else { s = diff / v; rdif = diffc(r2); gdif = diffc(g2); bdif = diffc(b2); if (r2 === v) { h2 = bdif - gdif; } else if (g2 === v) { h2 = 1 / 3 + rdif - bdif; } else if (b2 === v) { h2 = 2 / 3 + gdif - rdif; } if (h2 < 0) { h2 += 1; } else if (h2 > 1) { h2 -= 1; } } return [ h2 * 360, s * 100, v * 100 ]; }; convert.rgb.hwb = function(rgb) { const r2 = rgb[0]; const g2 = rgb[1]; let b2 = rgb[2]; const h2 = convert.rgb.hsl(rgb)[0]; const w2 = 1 / 255 * Math.min(r2, Math.min(g2, b2)); b2 = 1 - 1 / 255 * Math.max(r2, Math.max(g2, b2)); return [h2, w2 * 100, b2 * 100]; }; convert.rgb.cmyk = function(rgb) { const r2 = rgb[0] / 255; const g2 = rgb[1] / 255; const b2 = rgb[2] / 255; const k = Math.min(1 - r2, 1 - g2, 1 - b2); const c = (1 - r2 - k) / (1 - k) || 0; const m = (1 - g2 - k) / (1 - k) || 0; const y2 = (1 - b2 - k) / (1 - k) || 0; return [c * 100, m * 100, y2 * 100, k * 100]; }; function comparativeDistance(x, y2) { return (x[0] - y2[0]) ** 2 + (x[1] - y2[1]) ** 2 + (x[2] - y2[2]) ** 2; } __name(comparativeDistance, "comparativeDistance"); convert.rgb.keyword = function(rgb) { const reversed = reverseKeywords[rgb]; if (reversed) { return reversed; } let currentClosestDistance = Infinity; let currentClosestKeyword; for (const keyword of Object.keys(cssKeywords)) { const value = cssKeywords[keyword]; const distance = comparativeDistance(rgb, value); if (distance < currentClosestDistance) { currentClosestDistance = distance; currentClosestKeyword = keyword; } } return currentClosestKeyword; }; convert.keyword.rgb = function(keyword) { return cssKeywords[keyword]; }; convert.rgb.xyz = function(rgb) { let r2 = rgb[0] / 255; let g2 = rgb[1] / 255; let b2 = rgb[2] / 255; r2 = r2 > 0.04045 ? ((r2 + 0.055) / 1.055) ** 2.4 : r2 / 12.92; g2 = g2 > 0.04045 ? ((g2 + 0.055) / 1.055) ** 2.4 : g2 / 12.92; b2 = b2 > 0.04045 ? ((b2 + 0.055) / 1.055) ** 2.4 : b2 / 12.92; const x = r2 * 0.4124 + g2 * 0.3576 + b2 * 0.1805; const y2 = r2 * 0.2126 + g2 * 0.7152 + b2 * 0.0722; const z = r2 * 0.0193 + g2 * 0.1192 + b2 * 0.9505; return [x * 100, y2 * 100, z * 100]; }; convert.rgb.lab = function(rgb) { const xyz = convert.rgb.xyz(rgb); let x = xyz[0]; let y2 = xyz[1]; let z = xyz[2]; x /= 95.047; y2 /= 100; z /= 108.883; x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116; y2 = y2 > 8856e-6 ? y2 ** (1 / 3) : 7.787 * y2 + 16 / 116; z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116; const l = 116 * y2 - 16; const a = 500 * (x - y2); const b2 = 200 * (y2 - z); return [l, a, b2]; }; convert.hsl.rgb = function(hsl) { const h2 = hsl[0] / 360; const s = hsl[1] / 100; const l = hsl[2] / 100; let t22; let t3; let val; if (s === 0) { val = l * 255; return [val, val, val]; } if (l < 0.5) { t22 = l * (1 + s); } else { t22 = l + s - l * s; } const t1 = 2 * l - t22; const rgb = [0, 0, 0]; for (let i = 0; i < 3; i++) { t3 = h2 + 1 / 3 * -(i - 1); if (t3 < 0) { t3++; } if (t3 > 1) { t3--; } if (6 * t3 < 1) { val = t1 + (t22 - t1) * 6 * t3; } else if (2 * t3 < 1) { val = t22; } else if (3 * t3 < 2) { val = t1 + (t22 - t1) * (2 / 3 - t3) * 6; } else { val = t1; } rgb[i] = val * 255; } return rgb; }; convert.hsl.hsv = function(hsl) { const h2 = hsl[0]; let s = hsl[1] / 100; let l = hsl[2] / 100; let smin = s; const lmin = Math.max(l, 0.01); l *= 2; s *= l <= 1 ? l : 2 - l; smin *= lmin <= 1 ? lmin : 2 - lmin; const v = (l + s) / 2; const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s); return [h2, sv * 100, v * 100]; }; convert.hsv.rgb = function(hsv) { const h2 = hsv[0] / 60; const s = hsv[1] / 100; let v = hsv[2] / 100; const hi = Math.floor(h2) % 6; const f = h2 - Math.floor(h2); const p2 = 255 * v * (1 - s); const q = 255 * v * (1 - s * f); const t3 = 255 * v * (1 - s * (1 - f)); v *= 255; switch (hi) { case 0: return [v, t3, p2]; case 1: return [q, v, p2]; case 2: return [p2, v, t3]; case 3: return [p2, q, v]; case 4: return [t3, p2, v]; case 5: return [v, p2, q]; } }; convert.hsv.hsl = function(hsv) { const h2 = hsv[0]; const s = hsv[1] / 100; const v = hsv[2] / 100; const vmin = Math.max(v, 0.01); let sl; let l; l = (2 - s) * v; const lmin = (2 - s) * vmin; sl = s * vmin; sl /= lmin <= 1 ? lmin : 2 - lmin; sl = sl || 0; l /= 2; return [h2, sl * 100, l * 100]; }; convert.hwb.rgb = function(hwb) { const h2 = hwb[0] / 360; let wh = hwb[1] / 100; let bl = hwb[2] / 100; const ratio = wh + bl; let f; if (ratio > 1) { wh /= ratio; bl /= ratio; } const i = Math.floor(6 * h2); const v = 1 - bl; f = 6 * h2 - i; if ((i & 1) !== 0) { f = 1 - f; } const n2 = wh + f * (v - wh); let r2; let g2; let b2; switch (i) { default: case 6: case 0: r2 = v; g2 = n2; b2 = wh; break; case 1: r2 = n2; g2 = v; b2 = wh; break; case 2: r2 = wh; g2 = v; b2 = n2; break; case 3: r2 = wh; g2 = n2; b2 = v; break; case 4: r2 = n2; g2 = wh; b2 = v; break; case 5: r2 = v; g2 = wh; b2 = n2; break; } return [r2 * 255, g2 * 255, b2 * 255]; }; convert.cmyk.rgb = function(cmyk) { const c = cmyk[0] / 100; const m = cmyk[1] / 100; const y2 = cmyk[2] / 100; const k = cmyk[3] / 100; const r2 = 1 - Math.min(1, c * (1 - k) + k); const g2 = 1 - Math.min(1, m * (1 - k) + k); const b2 = 1 - Math.min(1, y2 * (1 - k) + k); return [r2 * 255, g2 * 255, b2 * 255]; }; convert.xyz.rgb = function(xyz) { const x = xyz[0] / 100; const y2 = xyz[1] / 100; const z = xyz[2] / 100; let r2; let g2; let b2; r2 = x * 3.2406 + y2 * -1.5372 + z * -0.4986; g2 = x * -0.9689 + y2 * 1.8758 + z * 0.0415; b2 = x * 0.0557 + y2 * -0.204 + z * 1.057; r2 = r2 > 31308e-7 ? 1.055 * r2 ** (1 / 2.4) - 0.055 : r2 * 12.92; g2 = g2 > 31308e-7 ? 1.055 * g2 ** (1 / 2.4) - 0.055 : g2 * 12.92; b2 = b2 > 31308e-7 ? 1.055 * b2 ** (1 / 2.4) - 0.055 : b2 * 12.92; r2 = Math.min(Math.max(0, r2), 1); g2 = Math.min(Math.max(0, g2), 1); b2 = Math.min(Math.max(0, b2), 1); return [r2 * 255, g2 * 255, b2 * 255]; }; convert.xyz.lab = function(xyz) { let x = xyz[0]; let y2 = xyz[1]; let z = xyz[2]; x /= 95.047; y2 /= 100; z /= 108.883; x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116; y2 = y2 > 8856e-6 ? y2 ** (1 / 3) : 7.787 * y2 + 16 / 116; z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116; const l = 116 * y2 - 16; const a = 500 * (x - y2); const b2 = 200 * (y2 - z); return [l, a, b2]; }; convert.lab.xyz = function(lab) { const l = lab[0]; const a = lab[1]; const b2 = lab[2]; let x; let y2; let z; y2 = (l + 16) / 116; x = a / 500 + y2; z = y2 - b2 / 200; const y22 = y2 ** 3; const x2 = x ** 3; const z2 = z ** 3; y2 = y22 > 8856e-6 ? y22 : (y2 - 16 / 116) / 7.787; x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787; z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787; x *= 95.047; y2 *= 100; z *= 108.883; return [x, y2, z]; }; convert.lab.lch = function(lab) { const l = lab[0]; const a = lab[1]; const b2 = lab[2]; let h2; const hr = Math.atan2(b2, a); h2 = hr * 360 / 2 / Math.PI; if (h2 < 0) { h2 += 360; } const c = Math.sqrt(a * a + b2 * b2); return [l, c, h2]; }; convert.lch.lab = function(lch) { const l = lch[0]; const c = lch[1]; const h2 = lch[2]; const hr = h2 / 360 * 2 * Math.PI; const a = c * Math.cos(hr); const b2 = c * Math.sin(hr); return [l, a, b2]; }; convert.rgb.ansi16 = function(args, saturation = null) { const [r2, g2, b2] = args; let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; value = Math.round(value / 50); if (value === 0) { return 30; } let ansi = 30 + (Math.round(b2 / 255) << 2 | Math.round(g2 / 255) << 1 | Math.round(r2 / 255)); if (value === 2) { ansi += 60; } return ansi; }; convert.hsv.ansi16 = function(args) { return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); }; convert.rgb.ansi256 = function(args) { const r2 = args[0]; const g2 = args[1]; const b2 = args[2]; if (r2 === g2 && g2 === b2) { if (r2 < 8) { return 16; } if (r2 > 248) { return 231; } return Math.round((r2 - 8) / 247 * 24) + 232; } const ansi = 16 + 36 * Math.round(r2 / 255 * 5) + 6 * Math.round(g2 / 255 * 5) + Math.round(b2 / 255 * 5); return ansi; }; convert.ansi16.rgb = function(args) { let color = args % 10; if (color === 0 || color === 7) { if (args > 50) { color += 3.5; } color = color / 10.5 * 255; return [color, color, color]; } const mult = (~~(args > 50) + 1) * 0.5; const r2 = (color & 1) * mult * 255; const g2 = (color >> 1 & 1) * mult * 255; const b2 = (color >> 2 & 1) * mult * 255; return [r2, g2, b2]; }; convert.ansi256.rgb = function(args) { if (args >= 232) { const c = (args - 232) * 10 + 8; return [c, c, c]; } args -= 16; let rem; const r2 = Math.floor(args / 36) / 5 * 255; const g2 = Math.floor((rem = args % 36) / 6) / 5 * 255; const b2 = rem % 6 / 5 * 255; return [r2, g2, b2]; }; convert.rgb.hex = function(args) { const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255); const string = integer.toString(16).toUpperCase(); return "000000".substring(string.length) + string; }; convert.hex.rgb = function(args) { const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); if (!match) { return [0, 0, 0]; } let colorString = match[0]; if (match[0].length === 3) { colorString = colorString.split("").map((char) => { return char + char; }).join(""); } const integer = parseInt(colorString, 16); const r2 = integer >> 16 & 255; const g2 = integer >> 8 & 255; const b2 = integer & 255; return [r2, g2, b2]; }; convert.rgb.hcg = function(rgb) { const r2 = rgb[0] / 255; const g2 = rgb[1] / 255; const b2 = rgb[2] / 255; const max2 = Math.max(Math.max(r2, g2), b2); const min2 = Math.min(Math.min(r2, g2), b2); const chroma = max2 - min2; let grayscale; let hue; if (chroma < 1) { grayscale = min2 / (1 - chroma); } else { grayscale = 0; } if (chroma <= 0) { hue = 0; } else if (max2 === r2) { hue = (g2 - b2) / chroma % 6; } else if (max2 === g2) { hue = 2 + (b2 - r2) / chroma; } else { hue = 4 + (r2 - g2) / chroma; } hue /= 6; hue %= 1; return [hue * 360, chroma * 100, grayscale * 100]; }; convert.hsl.hcg = function(hsl) { const s = hsl[1] / 100; const l = hsl[2] / 100; const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l); let f = 0; if (c < 1) { f = (l - 0.5 * c) / (1 - c); } return [hsl[0], c * 100, f * 100]; }; convert.hsv.hcg = function(hsv) { const s = hsv[1] / 100; const v = hsv[2] / 100; const c = s * v; let f = 0; if (c < 1) { f = (v - c) / (1 - c); } return [hsv[0], c * 100, f * 100]; }; convert.hcg.rgb = function(hcg) { const h2 = hcg[0] / 360; const c = hcg[1] / 100; const g2 = hcg[2] / 100; if (c === 0) { return [g2 * 255, g2 * 255, g2 * 255]; } const pure = [0, 0, 0]; const hi = h2 % 1 * 6; const v = hi % 1; const w2 = 1 - v; let mg = 0; switch (Math.floor(hi)) { case 0: pure[0] = 1; pure[1] = v; pure[2] = 0; break; case 1: pure[0] = w2; pure[1] = 1; pure[2] = 0; break; case 2: pure[0] = 0; pure[1] = 1; pure[2] = v; break; case 3: pure[0] = 0; pure[1] = w2; pure[2] = 1; break; case 4: pure[0] = v; pure[1] = 0; pure[2] = 1; break; default: pure[0] = 1; pure[1] = 0; pure[2] = w2; } mg = (1 - c) * g2; return [ (c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255 ]; }; convert.hcg.hsv = function(hcg) { const c = hcg[1] / 100; const g2 = hcg[2] / 100; const v = c + g2 * (1 - c); let f = 0; if (v > 0) { f = c / v; } return [hcg[0], f * 100, v * 100]; }; convert.hcg.hsl = function(hcg) { const c = hcg[1] / 100; const g2 = hcg[2] / 100; const l = g2 * (1 - c) + 0.5 * c; let s = 0; if (l > 0 && l < 0.5) { s = c / (2 * l); } else if (l >= 0.5 && l < 1) { s = c / (2 * (1 - l)); } return [hcg[0], s * 100, l * 100]; }; convert.hcg.hwb = function(hcg) { const c = hcg[1] / 100; const g2 = hcg[2] / 100; const v = c + g2 * (1 - c); return [hcg[0], (v - c) * 100, (1 - v) * 100]; }; convert.hwb.hcg = function(hwb) { const w2 = hwb[1] / 100; const b2 = hwb[2] / 100; const v = 1 - b2; const c = v - w2; let g2 = 0; if (c < 1) { g2 = (v - c) / (1 - c); } return [hwb[0], c * 100, g2 * 100]; }; convert.apple.rg