UNPKG

@cerberus-design/styled-system

Version:

Cerberus Design System Panda-CSS styled-system.

1,516 lines (1,503 loc) 641 kB
#!/usr/bin/env node "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 __esm = (fn, res) => function __init() { return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; }; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; 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 = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); // ../../node_modules/.pnpm/tsup@8.0.2_@swc+core@1.7.6_postcss@8.4.49_typescript@5.6.2/node_modules/tsup/assets/cjs_shims.js var getImportMetaUrl, importMetaUrl; var init_cjs_shims = __esm({ "../../node_modules/.pnpm/tsup@8.0.2_@swc+core@1.7.6_postcss@8.4.49_typescript@5.6.2/node_modules/tsup/assets/cjs_shims.js"() { "use strict"; getImportMetaUrl = () => typeof document === "undefined" ? new URL("file:" + __filename).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href; importMetaUrl = /* @__PURE__ */ getImportMetaUrl(); } }); // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js var require_polyfills = __commonJS({ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports2, module2) { "use strict"; init_cjs_shims(); var constants = require("constants"); var origCwd = process.cwd; var cwd = null; var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform; process.cwd = function() { if (!cwd) cwd = origCwd.call(process); return cwd; }; try { process.cwd(); } catch (er) { } if (typeof process.chdir === "function") { chdir = process.chdir; process.chdir = function(d) { cwd = null; chdir.call(process, d); }; if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); } var chdir; module2.exports = patch; function patch(fs2) { if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { patchLchmod(fs2); } if (!fs2.lutimes) { patchLutimes(fs2); } fs2.chown = chownFix(fs2.chown); fs2.fchown = chownFix(fs2.fchown); fs2.lchown = chownFix(fs2.lchown); fs2.chmod = chmodFix(fs2.chmod); fs2.fchmod = chmodFix(fs2.fchmod); fs2.lchmod = chmodFix(fs2.lchmod); fs2.chownSync = chownFixSync(fs2.chownSync); fs2.fchownSync = chownFixSync(fs2.fchownSync); fs2.lchownSync = chownFixSync(fs2.lchownSync); fs2.chmodSync = chmodFixSync(fs2.chmodSync); fs2.fchmodSync = chmodFixSync(fs2.fchmodSync); fs2.lchmodSync = chmodFixSync(fs2.lchmodSync); fs2.stat = statFix(fs2.stat); fs2.fstat = statFix(fs2.fstat); fs2.lstat = statFix(fs2.lstat); fs2.statSync = statFixSync(fs2.statSync); fs2.fstatSync = statFixSync(fs2.fstatSync); fs2.lstatSync = statFixSync(fs2.lstatSync); if (fs2.chmod && !fs2.lchmod) { fs2.lchmod = function(path4, mode, cb) { if (cb) process.nextTick(cb); }; fs2.lchmodSync = function() { }; } if (fs2.chown && !fs2.lchown) { fs2.lchown = function(path4, uid, gid, cb) { if (cb) process.nextTick(cb); }; fs2.lchownSync = function() { }; } if (platform === "win32") { fs2.rename = typeof fs2.rename !== "function" ? fs2.rename : function(fs$rename) { function rename(from, to, cb) { var start = Date.now(); var backoff = 0; fs$rename(from, to, function CB(er) { if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) { setTimeout(function() { fs2.stat(to, function(stater, st) { if (stater && stater.code === "ENOENT") fs$rename(from, to, CB); else cb(er); }); }, backoff); if (backoff < 100) backoff += 10; return; } if (cb) cb(er); }); } if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); return rename; }(fs2.rename); } fs2.read = typeof fs2.read !== "function" ? fs2.read : function(fs$read) { function read(fd, buffer, offset, length, position, callback_) { var callback; if (callback_ && typeof callback_ === "function") { var eagCounter = 0; callback = function(er, _, __) { if (er && er.code === "EAGAIN" && eagCounter < 10) { eagCounter++; return fs$read.call(fs2, fd, buffer, offset, length, position, callback); } callback_.apply(this, arguments); }; } return fs$read.call(fs2, fd, buffer, offset, length, position, callback); } if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); return read; }(fs2.read); fs2.readSync = typeof fs2.readSync !== "function" ? fs2.readSync : /* @__PURE__ */ function(fs$readSync) { return function(fd, buffer, offset, length, position) { var eagCounter = 0; while (true) { try { return fs$readSync.call(fs2, fd, buffer, offset, length, position); } catch (er) { if (er.code === "EAGAIN" && eagCounter < 10) { eagCounter++; continue; } throw er; } } }; }(fs2.readSync); function patchLchmod(fs3) { fs3.lchmod = function(path4, mode, callback) { fs3.open( path4, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) { if (err) { if (callback) callback(err); return; } fs3.fchmod(fd, mode, function(err2) { fs3.close(fd, function(err22) { if (callback) callback(err2 || err22); }); }); } ); }; fs3.lchmodSync = function(path4, mode) { var fd = fs3.openSync(path4, constants.O_WRONLY | constants.O_SYMLINK, mode); var threw = true; var ret; try { ret = fs3.fchmodSync(fd, mode); threw = false; } finally { if (threw) { try { fs3.closeSync(fd); } catch (er) { } } else { fs3.closeSync(fd); } } return ret; }; } function patchLutimes(fs3) { if (constants.hasOwnProperty("O_SYMLINK") && fs3.futimes) { fs3.lutimes = function(path4, at, mt, cb) { fs3.open(path4, constants.O_SYMLINK, function(er, fd) { if (er) { if (cb) cb(er); return; } fs3.futimes(fd, at, mt, function(er2) { fs3.close(fd, function(er22) { if (cb) cb(er2 || er22); }); }); }); }; fs3.lutimesSync = function(path4, at, mt) { var fd = fs3.openSync(path4, constants.O_SYMLINK); var ret; var threw = true; try { ret = fs3.futimesSync(fd, at, mt); threw = false; } finally { if (threw) { try { fs3.closeSync(fd); } catch (er) { } } else { fs3.closeSync(fd); } } return ret; }; } else if (fs3.futimes) { fs3.lutimes = function(_a, _b, _c, cb) { if (cb) process.nextTick(cb); }; fs3.lutimesSync = function() { }; } } function chmodFix(orig) { if (!orig) return orig; return function(target, mode, cb) { return orig.call(fs2, target, mode, function(er) { if (chownErOk(er)) er = null; if (cb) cb.apply(this, arguments); }); }; } function chmodFixSync(orig) { if (!orig) return orig; return function(target, mode) { try { return orig.call(fs2, target, mode); } catch (er) { if (!chownErOk(er)) throw er; } }; } function chownFix(orig) { if (!orig) return orig; return function(target, uid, gid, cb) { return orig.call(fs2, target, uid, gid, function(er) { if (chownErOk(er)) er = null; if (cb) cb.apply(this, arguments); }); }; } function chownFixSync(orig) { if (!orig) return orig; return function(target, uid, gid) { try { return orig.call(fs2, target, uid, gid); } catch (er) { if (!chownErOk(er)) throw er; } }; } function statFix(orig) { if (!orig) return orig; return function(target, options, cb) { if (typeof options === "function") { cb = options; options = null; } function callback(er, stats) { if (stats) { if (stats.uid < 0) stats.uid += 4294967296; if (stats.gid < 0) stats.gid += 4294967296; } if (cb) cb.apply(this, arguments); } return options ? orig.call(fs2, target, options, callback) : orig.call(fs2, target, callback); }; } function statFixSync(orig) { if (!orig) return orig; return function(target, options) { var stats = options ? orig.call(fs2, target, options) : orig.call(fs2, target); if (stats) { if (stats.uid < 0) stats.uid += 4294967296; if (stats.gid < 0) stats.gid += 4294967296; } return stats; }; } function chownErOk(er) { if (!er) return true; if (er.code === "ENOSYS") return true; var nonroot = !process.getuid || process.getuid() !== 0; if (nonroot) { if (er.code === "EINVAL" || er.code === "EPERM") return true; } return false; } } } }); // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js var require_legacy_streams = __commonJS({ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { "use strict"; init_cjs_shims(); var Stream = require("stream").Stream; module2.exports = legacy; function legacy(fs2) { return { ReadStream, WriteStream }; function ReadStream(path4, options) { if (!(this instanceof ReadStream)) return new ReadStream(path4, options); Stream.call(this); var self = this; this.path = path4; this.fd = null; this.readable = true; this.paused = false; this.flags = "r"; this.mode = 438; this.bufferSize = 64 * 1024; options = options || {}; var keys = Object.keys(options); for (var index = 0, length = keys.length; index < length; index++) { var key = keys[index]; this[key] = options[key]; } if (this.encoding) this.setEncoding(this.encoding); if (this.start !== void 0) { if ("number" !== typeof this.start) { throw TypeError("start must be a Number"); } if (this.end === void 0) { this.end = Infinity; } else if ("number" !== typeof this.end) { throw TypeError("end must be a Number"); } if (this.start > this.end) { throw new Error("start must be <= end"); } this.pos = this.start; } if (this.fd !== null) { process.nextTick(function() { self._read(); }); return; } fs2.open(this.path, this.flags, this.mode, function(err, fd) { if (err) { self.emit("error", err); self.readable = false; return; } self.fd = fd; self.emit("open", fd); self._read(); }); } function WriteStream(path4, options) { if (!(this instanceof WriteStream)) return new WriteStream(path4, options); Stream.call(this); this.path = path4; this.fd = null; this.writable = true; this.flags = "w"; this.encoding = "binary"; this.mode = 438; this.bytesWritten = 0; options = options || {}; var keys = Object.keys(options); for (var index = 0, length = keys.length; index < length; index++) { var key = keys[index]; this[key] = options[key]; } if (this.start !== void 0) { if ("number" !== typeof this.start) { throw TypeError("start must be a Number"); } if (this.start < 0) { throw new Error("start must be >= zero"); } this.pos = this.start; } this.busy = false; this._queue = []; if (this.fd === null) { this._open = fs2.open; this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); this.flush(); } } } } }); // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js var require_clone = __commonJS({ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports2, module2) { "use strict"; init_cjs_shims(); module2.exports = clone; var getPrototypeOf = Object.getPrototypeOf || function(obj) { return obj.__proto__; }; function clone(obj) { if (obj === null || typeof obj !== "object") return obj; if (obj instanceof Object) var copy = { __proto__: getPrototypeOf(obj) }; else var copy = /* @__PURE__ */ Object.create(null); Object.getOwnPropertyNames(obj).forEach(function(key) { Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); }); return copy; } } }); // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js var require_graceful_fs = __commonJS({ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { "use strict"; init_cjs_shims(); var fs2 = require("fs"); var polyfills = require_polyfills(); var legacy = require_legacy_streams(); var clone = require_clone(); var util = require("util"); var gracefulQueue; var previousSymbol; if (typeof Symbol === "function" && typeof Symbol.for === "function") { gracefulQueue = Symbol.for("graceful-fs.queue"); previousSymbol = Symbol.for("graceful-fs.previous"); } else { gracefulQueue = "___graceful-fs.queue"; previousSymbol = "___graceful-fs.previous"; } function noop3() { } function publishQueue(context, queue2) { Object.defineProperty(context, gracefulQueue, { get: function() { return queue2; } }); } var debug2 = noop3; if (util.debuglog) debug2 = util.debuglog("gfs4"); else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) debug2 = function() { var m = util.format.apply(util, arguments); m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); console.error(m); }; if (!fs2[gracefulQueue]) { queue = global[gracefulQueue] || []; publishQueue(fs2, queue); fs2.close = function(fs$close) { function close(fd, cb) { return fs$close.call(fs2, fd, function(err) { if (!err) { resetQueue(); } if (typeof cb === "function") cb.apply(this, arguments); }); } Object.defineProperty(close, previousSymbol, { value: fs$close }); return close; }(fs2.close); fs2.closeSync = function(fs$closeSync) { function closeSync(fd) { fs$closeSync.apply(fs2, arguments); resetQueue(); } Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync }); return closeSync; }(fs2.closeSync); if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { process.on("exit", function() { debug2(fs2[gracefulQueue]); require("assert").equal(fs2[gracefulQueue].length, 0); }); } } var queue; if (!global[gracefulQueue]) { publishQueue(global, fs2[gracefulQueue]); } module2.exports = patch(clone(fs2)); if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs2.__patched) { module2.exports = patch(fs2); fs2.__patched = true; } function patch(fs3) { polyfills(fs3); fs3.gracefulify = patch; fs3.createReadStream = createReadStream; fs3.createWriteStream = createWriteStream; var fs$readFile = fs3.readFile; fs3.readFile = readFile; function readFile(path4, options, cb) { if (typeof options === "function") cb = options, options = null; return go$readFile(path4, options, cb); function go$readFile(path5, options2, cb2, startTime) { return fs$readFile(path5, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([go$readFile, [path5, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); } }); } } var fs$writeFile = fs3.writeFile; fs3.writeFile = writeFile; function writeFile(path4, data, options, cb) { if (typeof options === "function") cb = options, options = null; return go$writeFile(path4, data, options, cb); function go$writeFile(path5, data2, options2, cb2, startTime) { return fs$writeFile(path5, data2, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([go$writeFile, [path5, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); } }); } } var fs$appendFile = fs3.appendFile; if (fs$appendFile) fs3.appendFile = appendFile; function appendFile(path4, data, options, cb) { if (typeof options === "function") cb = options, options = null; return go$appendFile(path4, data, options, cb); function go$appendFile(path5, data2, options2, cb2, startTime) { return fs$appendFile(path5, data2, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([go$appendFile, [path5, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); } }); } } var fs$copyFile = fs3.copyFile; if (fs$copyFile) fs3.copyFile = copyFile; function copyFile(src, dest, flags, cb) { if (typeof flags === "function") { cb = flags; flags = 0; } return go$copyFile(src, dest, flags, cb); function go$copyFile(src2, dest2, flags2, cb2, startTime) { return fs$copyFile(src2, dest2, flags2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); } }); } } var fs$readdir = fs3.readdir; fs3.readdir = readdir; var noReaddirOptionVersions = /^v[0-5]\./; function readdir(path4, options, cb) { if (typeof options === "function") cb = options, options = null; var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path5, options2, cb2, startTime) { return fs$readdir(path5, fs$readdirCallback( path5, options2, cb2, startTime )); } : function go$readdir2(path5, options2, cb2, startTime) { return fs$readdir(path5, options2, fs$readdirCallback( path5, options2, cb2, startTime )); }; return go$readdir(path4, options, cb); function fs$readdirCallback(path5, options2, cb2, startTime) { return function(err, files) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([ go$readdir, [path5, options2, cb2], err, startTime || Date.now(), Date.now() ]); else { if (files && files.sort) files.sort(); if (typeof cb2 === "function") cb2.call(this, err, files); } }; } } if (process.version.substr(0, 4) === "v0.8") { var legStreams = legacy(fs3); ReadStream = legStreams.ReadStream; WriteStream = legStreams.WriteStream; } var fs$ReadStream = fs3.ReadStream; if (fs$ReadStream) { ReadStream.prototype = Object.create(fs$ReadStream.prototype); ReadStream.prototype.open = ReadStream$open; } var fs$WriteStream = fs3.WriteStream; if (fs$WriteStream) { WriteStream.prototype = Object.create(fs$WriteStream.prototype); WriteStream.prototype.open = WriteStream$open; } Object.defineProperty(fs3, "ReadStream", { get: function() { return ReadStream; }, set: function(val) { ReadStream = val; }, enumerable: true, configurable: true }); Object.defineProperty(fs3, "WriteStream", { get: function() { return WriteStream; }, set: function(val) { WriteStream = val; }, enumerable: true, configurable: true }); var FileReadStream = ReadStream; Object.defineProperty(fs3, "FileReadStream", { get: function() { return FileReadStream; }, set: function(val) { FileReadStream = val; }, enumerable: true, configurable: true }); var FileWriteStream = WriteStream; Object.defineProperty(fs3, "FileWriteStream", { get: function() { return FileWriteStream; }, set: function(val) { FileWriteStream = val; }, enumerable: true, configurable: true }); function ReadStream(path4, options) { if (this instanceof ReadStream) return fs$ReadStream.apply(this, arguments), this; else return ReadStream.apply(Object.create(ReadStream.prototype), arguments); } function ReadStream$open() { var that = this; open(that.path, that.flags, that.mode, function(err, fd) { if (err) { if (that.autoClose) that.destroy(); that.emit("error", err); } else { that.fd = fd; that.emit("open", fd); that.read(); } }); } function WriteStream(path4, options) { if (this instanceof WriteStream) return fs$WriteStream.apply(this, arguments), this; else return WriteStream.apply(Object.create(WriteStream.prototype), arguments); } function WriteStream$open() { var that = this; open(that.path, that.flags, that.mode, function(err, fd) { if (err) { that.destroy(); that.emit("error", err); } else { that.fd = fd; that.emit("open", fd); } }); } function createReadStream(path4, options) { return new fs3.ReadStream(path4, options); } function createWriteStream(path4, options) { return new fs3.WriteStream(path4, options); } var fs$open = fs3.open; fs3.open = open; function open(path4, flags, mode, cb) { if (typeof mode === "function") cb = mode, mode = null; return go$open(path4, flags, mode, cb); function go$open(path5, flags2, mode2, cb2, startTime) { return fs$open(path5, flags2, mode2, function(err, fd) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([go$open, [path5, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); } }); } } return fs3; } function enqueue(elem) { debug2("ENQUEUE", elem[0].name, elem[1]); fs2[gracefulQueue].push(elem); retry(); } var retryTimer; function resetQueue() { var now = Date.now(); for (var i = 0; i < fs2[gracefulQueue].length; ++i) { if (fs2[gracefulQueue][i].length > 2) { fs2[gracefulQueue][i][3] = now; fs2[gracefulQueue][i][4] = now; } } retry(); } function retry() { clearTimeout(retryTimer); retryTimer = void 0; if (fs2[gracefulQueue].length === 0) return; var elem = fs2[gracefulQueue].shift(); var fn = elem[0]; var args = elem[1]; var err = elem[2]; var startTime = elem[3]; var lastTime = elem[4]; if (startTime === void 0) { debug2("RETRY", fn.name, args); fn.apply(null, args); } else if (Date.now() - startTime >= 6e4) { debug2("TIMEOUT", fn.name, args); var cb = args.pop(); if (typeof cb === "function") cb.call(null, err); } else { var sinceAttempt = Date.now() - lastTime; var sinceStart = Math.max(lastTime - startTime, 1); var desiredDelay = Math.min(sinceStart * 1.2, 100); if (sinceAttempt >= desiredDelay) { debug2("RETRY", fn.name, args); fn.apply(null, args.concat([startTime])); } else { fs2[gracefulQueue].push(elem); } } if (retryTimer === void 0) { retryTimer = setTimeout(retry, 0); } } } }); // ../../node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.js var require_imurmurhash = __commonJS({ "../../node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.js"(exports2, module2) { "use strict"; init_cjs_shims(); (function() { var cache; function MurmurHash3(key, seed) { var m = this instanceof MurmurHash3 ? this : cache; m.reset(seed); if (typeof key === "string" && key.length > 0) { m.hash(key); } if (m !== this) { return m; } } ; MurmurHash3.prototype.hash = function(key) { var h1, k1, i, top, len; len = key.length; this.len += len; k1 = this.k1; i = 0; switch (this.rem) { case 0: k1 ^= len > i ? key.charCodeAt(i++) & 65535 : 0; case 1: k1 ^= len > i ? (key.charCodeAt(i++) & 65535) << 8 : 0; case 2: k1 ^= len > i ? (key.charCodeAt(i++) & 65535) << 16 : 0; case 3: k1 ^= len > i ? (key.charCodeAt(i) & 255) << 24 : 0; k1 ^= len > i ? (key.charCodeAt(i++) & 65280) >> 8 : 0; } this.rem = len + this.rem & 3; len -= this.rem; if (len > 0) { h1 = this.h1; while (1) { k1 = k1 * 11601 + (k1 & 65535) * 3432906752 & 4294967295; k1 = k1 << 15 | k1 >>> 17; k1 = k1 * 13715 + (k1 & 65535) * 461832192 & 4294967295; h1 ^= k1; h1 = h1 << 13 | h1 >>> 19; h1 = h1 * 5 + 3864292196 & 4294967295; if (i >= len) { break; } k1 = key.charCodeAt(i++) & 65535 ^ (key.charCodeAt(i++) & 65535) << 8 ^ (key.charCodeAt(i++) & 65535) << 16; top = key.charCodeAt(i++); k1 ^= (top & 255) << 24 ^ (top & 65280) >> 8; } k1 = 0; switch (this.rem) { case 3: k1 ^= (key.charCodeAt(i + 2) & 65535) << 16; case 2: k1 ^= (key.charCodeAt(i + 1) & 65535) << 8; case 1: k1 ^= key.charCodeAt(i) & 65535; } this.h1 = h1; } this.k1 = k1; return this; }; MurmurHash3.prototype.result = function() { var k1, h1; k1 = this.k1; h1 = this.h1; if (k1 > 0) { k1 = k1 * 11601 + (k1 & 65535) * 3432906752 & 4294967295; k1 = k1 << 15 | k1 >>> 17; k1 = k1 * 13715 + (k1 & 65535) * 461832192 & 4294967295; h1 ^= k1; } h1 ^= this.len; h1 ^= h1 >>> 16; h1 = h1 * 51819 + (h1 & 65535) * 2246770688 & 4294967295; h1 ^= h1 >>> 13; h1 = h1 * 44597 + (h1 & 65535) * 3266445312 & 4294967295; h1 ^= h1 >>> 16; return h1 >>> 0; }; MurmurHash3.prototype.reset = function(seed) { this.h1 = typeof seed === "number" ? seed : 0; this.rem = this.k1 = this.len = 0; return this; }; cache = new MurmurHash3(); if (typeof module2 != "undefined") { module2.exports = MurmurHash3; } else { this.MurmurHash3 = MurmurHash3; } })(); } }); // ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js var require_signals = __commonJS({ "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js"(exports2, module2) { "use strict"; init_cjs_shims(); module2.exports = [ "SIGABRT", "SIGALRM", "SIGHUP", "SIGINT", "SIGTERM" ]; if (process.platform !== "win32") { module2.exports.push( "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT" // should detect profiler and enable/disable accordingly. // see #21 // 'SIGPROF' ); } if (process.platform === "linux") { module2.exports.push( "SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT", "SIGUNUSED" ); } } }); // ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js var require_signal_exit = __commonJS({ "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports2, module2) { "use strict"; init_cjs_shims(); var process8 = global.process; var processOk = function(process9) { return process9 && typeof process9 === "object" && typeof process9.removeListener === "function" && typeof process9.emit === "function" && typeof process9.reallyExit === "function" && typeof process9.listeners === "function" && typeof process9.kill === "function" && typeof process9.pid === "number" && typeof process9.on === "function"; }; if (!processOk(process8)) { module2.exports = function() { return function() { }; }; } else { assert2 = require("assert"); signals = require_signals(); isWin = /^win/i.test(process8.platform); EE = require("events"); if (typeof EE !== "function") { EE = EE.EventEmitter; } if (process8.__signal_exit_emitter__) { emitter = process8.__signal_exit_emitter__; } else { emitter = process8.__signal_exit_emitter__ = new EE(); emitter.count = 0; emitter.emitted = {}; } if (!emitter.infinite) { emitter.setMaxListeners(Infinity); emitter.infinite = true; } module2.exports = function(cb, opts) { if (!processOk(global.process)) { return function() { }; } assert2.equal(typeof cb, "function", "a callback must be provided for exit handler"); if (loaded === false) { load(); } var ev = "exit"; if (opts && opts.alwaysLast) { ev = "afterexit"; } var remove = function() { emitter.removeListener(ev, cb); if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) { unload(); } }; emitter.on(ev, cb); return remove; }; unload = function unload2() { if (!loaded || !processOk(global.process)) { return; } loaded = false; signals.forEach(function(sig) { try { process8.removeListener(sig, sigListeners[sig]); } catch (er) { } }); process8.emit = originalProcessEmit; process8.reallyExit = originalProcessReallyExit; emitter.count -= 1; }; module2.exports.unload = unload; emit = function emit2(event, code, signal) { if (emitter.emitted[event]) { return; } emitter.emitted[event] = true; emitter.emit(event, code, signal); }; sigListeners = {}; signals.forEach(function(sig) { sigListeners[sig] = function listener() { if (!processOk(global.process)) { return; } var listeners = process8.listeners(sig); if (listeners.length === emitter.count) { unload(); emit("exit", null, sig); emit("afterexit", null, sig); if (isWin && sig === "SIGHUP") { sig = "SIGINT"; } process8.kill(process8.pid, sig); } }; }); module2.exports.signals = function() { return signals; }; loaded = false; load = function load2() { if (loaded || !processOk(global.process)) { return; } loaded = true; emitter.count += 1; signals = signals.filter(function(sig) { try { process8.on(sig, sigListeners[sig]); return true; } catch (er) { return false; } }); process8.emit = processEmit; process8.reallyExit = processReallyExit; }; module2.exports.load = load; originalProcessReallyExit = process8.reallyExit; processReallyExit = function processReallyExit2(code) { if (!processOk(global.process)) { return; } process8.exitCode = code || /* istanbul ignore next */ 0; emit("exit", process8.exitCode, null); emit("afterexit", process8.exitCode, null); originalProcessReallyExit.call(process8, process8.exitCode); }; originalProcessEmit = process8.emit; processEmit = function processEmit2(ev, arg) { if (ev === "exit" && processOk(global.process)) { if (arg !== void 0) { process8.exitCode = arg; } var ret = originalProcessEmit.apply(this, arguments); emit("exit", process8.exitCode, null); emit("afterexit", process8.exitCode, null); return ret; } else { return originalProcessEmit.apply(this, arguments); } }; } var assert2; var signals; var isWin; var EE; var emitter; var unload; var emit; var sigListeners; var loaded; var load; var originalProcessReallyExit; var processReallyExit; var originalProcessEmit; var processEmit; } }); // ../../node_modules/.pnpm/is-typedarray@1.0.0/node_modules/is-typedarray/index.js var require_is_typedarray = __commonJS({ "../../node_modules/.pnpm/is-typedarray@1.0.0/node_modules/is-typedarray/index.js"(exports2, module2) { "use strict"; init_cjs_shims(); module2.exports = isTypedArray; isTypedArray.strict = isStrictTypedArray; isTypedArray.loose = isLooseTypedArray; var toString2 = Object.prototype.toString; var names = { "[object Int8Array]": true, "[object Int16Array]": true, "[object Int32Array]": true, "[object Uint8Array]": true, "[object Uint8ClampedArray]": true, "[object Uint16Array]": true, "[object Uint32Array]": true, "[object Float32Array]": true, "[object Float64Array]": true }; function isTypedArray(arr) { return isStrictTypedArray(arr) || isLooseTypedArray(arr); } function isStrictTypedArray(arr) { return arr instanceof Int8Array || arr instanceof Int16Array || arr instanceof Int32Array || arr instanceof Uint8Array || arr instanceof Uint8ClampedArray || arr instanceof Uint16Array || arr instanceof Uint32Array || arr instanceof Float32Array || arr instanceof Float64Array; } function isLooseTypedArray(arr) { return names[toString2.call(arr)]; } } }); // ../../node_modules/.pnpm/typedarray-to-buffer@3.1.5/node_modules/typedarray-to-buffer/index.js var require_typedarray_to_buffer = __commonJS({ "../../node_modules/.pnpm/typedarray-to-buffer@3.1.5/node_modules/typedarray-to-buffer/index.js"(exports2, module2) { "use strict"; init_cjs_shims(); var isTypedArray = require_is_typedarray().strict; module2.exports = function typedarrayToBuffer(arr) { if (isTypedArray(arr)) { var buf = Buffer.from(arr.buffer); if (arr.byteLength !== arr.buffer.byteLength) { buf = buf.slice(arr.byteOffset, arr.byteOffset + arr.byteLength); } return buf; } else { return Buffer.from(arr); } }; } }); // ../../node_modules/.pnpm/write-file-atomic@3.0.3/node_modules/write-file-atomic/index.js var require_write_file_atomic = __commonJS({ "../../node_modules/.pnpm/write-file-atomic@3.0.3/node_modules/write-file-atomic/index.js"(exports2, module2) { "use strict"; init_cjs_shims(); module2.exports = writeFile; module2.exports.sync = writeFileSync; module2.exports._getTmpname = getTmpname; module2.exports._cleanupOnExit = cleanupOnExit; var fs2 = require("fs"); var MurmurHash3 = require_imurmurhash(); var onExit = require_signal_exit(); var path4 = require("path"); var isTypedArray = require_is_typedarray(); var typedArrayToBuffer = require_typedarray_to_buffer(); var { promisify: promisify5 } = require("util"); var activeFiles = {}; var threadId = function getId() { try { const workerThreads = require("worker_threads"); return workerThreads.threadId; } catch (e) { return 0; } }(); var invocations = 0; function getTmpname(filename) { return filename + "." + MurmurHash3(__filename).hash(String(process.pid)).hash(String(threadId)).hash(String(++invocations)).result(); } function cleanupOnExit(tmpfile) { return () => { try { fs2.unlinkSync(typeof tmpfile === "function" ? tmpfile() : tmpfile); } catch (_) { } }; } function serializeActiveFile(absoluteName) { return new Promise((resolve2) => { if (!activeFiles[absoluteName]) activeFiles[absoluteName] = []; activeFiles[absoluteName].push(resolve2); if (activeFiles[absoluteName].length === 1) resolve2(); }); } function isChownErrOk(err) { if (err.code === "ENOSYS") { return true; } const nonroot = !process.getuid || process.getuid() !== 0; if (nonroot) { if (err.code === "EINVAL" || err.code === "EPERM") { return true; } } return false; } async function writeFileAsync(filename, data, options = {}) { if (typeof options === "string") { options = { encoding: options }; } let fd; let tmpfile; const removeOnExitHandler = onExit(cleanupOnExit(() => tmpfile)); const absoluteName = path4.resolve(filename); try { await serializeActiveFile(absoluteName); const truename = await promisify5(fs2.realpath)(filename).catch(() => filename); tmpfile = getTmpname(truename); if (!options.mode || !options.chown) { const stats = await promisify5(fs2.stat)(truename).catch(() => { }); if (stats) { if (options.mode == null) { options.mode = stats.mode; } if (options.chown == null && process.getuid) { options.chown = { uid: stats.uid, gid: stats.gid }; } } } fd = await promisify5(fs2.open)(tmpfile, "w", options.mode); if (options.tmpfileCreated) { await options.tmpfileCreated(tmpfile); } if (isTypedArray(data)) { data = typedArrayToBuffer(data); } if (Buffer.isBuffer(data)) { await promisify5(fs2.write)(fd, data, 0, data.length, 0); } else if (data != null) { await promisify5(fs2.write)(fd, String(data), 0, String(options.encoding || "utf8")); } if (options.fsync !== false) { await promisify5(fs2.fsync)(fd); } await promisify5(fs2.close)(fd); fd = null; if (options.chown) { await promisify5(fs2.chown)(tmpfile, options.chown.uid, options.chown.gid).catch((err) => { if (!isChownErrOk(err)) { throw err; } }); } if (options.mode) { await promisify5(fs2.chmod)(tmpfile, options.mode).catch((err) => { if (!isChownErrOk(err)) { throw err; } }); } await promisify5(fs2.rename)(tmpfile, truename); } finally { if (fd) { await promisify5(fs2.close)(fd).catch( /* istanbul ignore next */ () => { } ); } removeOnExitHandler(); await promisify5(fs2.unlink)(tmpfile).catch(() => { }); activeFiles[absoluteName].shift(); if (activeFiles[absoluteName].length > 0) { activeFiles[absoluteName][0](); } else delete activeFiles[absoluteName]; } } function writeFile(filename, data, options, callback) { if (options instanceof Function) { callback = options; options = {}; } const promise = writeFileAsync(filename, data, options); if (callback) { promise.then(callback, callback); } return promise; } function writeFileSync(filename, data, options) { if (typeof options === "string") options = { encoding: options }; else if (!options) options = {}; try { filename = fs2.realpathSync(filename); } catch (ex) { } const tmpfile = getTmpname(filename); if (!options.mode || !options.chown) { try { const stats = fs2.statSync(filename); options = Object.assign({}, options); if (!options.mode) { options.mode = stats.mode; } if (!options.chown && process.getuid) { options.chown = { uid: stats.uid, gid: stats.gid }; } } catch (ex) { } } let fd; const cleanup = cleanupOnExit(tmpfile); const removeOnExitHandler = onExit(cleanup); let threw = true; try { fd = fs2.openSync(tmpfile, "w", options.mode || 438); if (options.tmpfileCreated) { options.tmpfileCreated(tmpfile); } if (isTypedArray(data)) { data = typedArrayToBuffer(data); } if (Buffer.isBuffer(data)) { fs2.writeSync(fd, data, 0, data.length, 0); } else if (data != null) { fs2.writeSync(fd, String(data), 0, String(options.encoding || "utf8")); } if (options.fsync !== false) { fs2.fsyncSync(fd); } fs2.closeSync(fd); fd = null; if (options.chown) { try { fs2.chownSync(tmpfile, options.chown.uid, options.chown.gid); } catch (err) { if (!isChownErrOk(err)) { throw err; } } } if (options.mode) { try { fs2.chmodSync(tmpfile, options.mode); } catch (err) { if (!isChownErrOk(err)) { throw err; } } } fs2.renameSync(tmpfile, filename); threw = false; } finally { if (fd) { try { fs2.closeSync(fd); } catch (ex) { } } removeOnExitHandler(); if (threw) { cleanup(); } } } } }); // ../../node_modules/.pnpm/is-obj@2.0.0/node_modules/is-obj/index.js var require_is_obj = __commonJS({ "../../node_modules/.pnpm/is-obj@2.0.0/node_modules/is-obj/index.js"(exports2, module2) { "use strict"; init_cjs_shims(); module2.exports = (value) => { const type = typeof value; return value !== null && (type === "object" || type === "function"); }; } }); // ../../node_modules/.pnpm/dot-prop@6.0.1/node_modules/dot-prop/index.js var require_dot_prop = __commonJS({ "../../node_modules/.pnpm/dot-prop@6.0.1/node_modules/dot-prop/index.js"(exports2, module2) { "use strict"; init_cjs_shims(); var isObj = require_is_obj(); var disallowedKeys = /* @__PURE__ */ new Set([ "__proto__", "prototype", "constructor" ]); var isValidPath = (pathSegments) => !pathSegments.some((segment) => disallowedKeys.has(segment)); function getPathSegments(path4) { const pathArray = path4.split("."); const parts = []; for (let i = 0; i < pathArray.length; i++) { let p2 = pathArray[i]; while (p2[p2.length - 1] === "\\" && pathArray[i + 1] !== void 0) { p2 = p2.slice(0, -1) + "."; p2 += pathArray[++i]; } parts.push(p2); } if (!isValidPath(parts)) { return []; } return parts; } module2.exports = { get(object, path4, value) { if (!isObj(object) || typeof path4 !== "string") { return value === void 0 ? object : value; } const pathArray = getPathSegments(path4); if (pathArray.length === 0) { return; } for (let i = 0; i < pathArray.length; i++) { object = object[pathArray[i]]; if (object === void 0 || object === null) { if (i !== pathArray.length - 1) { return value; } break; } } return object === void 0 ? value : object; }, set(object, path4, value) { if (!isObj(object) || typeof path4 !== "string") { return object; } const root = object; const pathArray = getPathSegments(path4); for (let i = 0; i < pathArray.length; i++) { const p2 = pathArray[i]; if (!isObj(object[p2])) { object[p2] = {}; } if (i === pathArray.length - 1) { object[p2] = value; } object = object[p2]; } return root; }, delete(object, path4) { if (!isObj(object) || typeof path4 !== "string") { return false; } const pathArray = getPathSegments(path4); for (let i =