Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1import { createRequire as __prettierCreateRequire } from "module";2import { fileURLToPath as __prettierFileUrlToPath } from "url";3import { dirname as __prettierDirname } from "path";4const require = __prettierCreateRequire(import.meta.url);5const __filename = __prettierFileUrlToPath(import.meta.url);6const __dirname = __prettierDirname(__filename);7 8var __defProp = Object.defineProperty;9var __getOwnPropNames = Object.getOwnPropertyNames;10var __esm = (fn, res) => function __init() {11 return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;12};13var __export = (target, all) => {14 for (var name in all)15 __defProp(target, name, { get: all[name], enumerable: true });16};17 18// scripts/build/shims/shared.js19var OPTIONAL_OBJECT, createMethodShim;20var init_shared = __esm({21 "scripts/build/shims/shared.js"() {22 OPTIONAL_OBJECT = 1;23 createMethodShim = (methodName, getImplementation) => (flags, object, ...arguments_) => {24 if (flags | OPTIONAL_OBJECT && (object === void 0 || object === null)) {25 return;26 }27 const implementation = getImplementation.call(object) ?? object[methodName];28 return implementation.apply(object, arguments_);29 };30 }31});32 33// scripts/build/shims/method-replace-all.js34var stringReplaceAll, replaceAll, method_replace_all_default;35var init_method_replace_all = __esm({36 "scripts/build/shims/method-replace-all.js"() {37 init_shared();38 stringReplaceAll = String.prototype.replaceAll ?? function(pattern, replacement) {39 if (pattern.global) {40 return this.replace(pattern, replacement);41 }42 return this.split(pattern).join(replacement);43 };44 replaceAll = createMethodShim("replaceAll", function() {45 if (typeof this === "string") {46 return stringReplaceAll;47 }48 });49 method_replace_all_default = replaceAll;50 }51});52 53// node_modules/find-up-path/dist/index.js54import fs from "fs";55import path from "path";56import process2 from "process";57var findUpPath, dist_default;58var init_dist = __esm({59 "node_modules/find-up-path/dist/index.js"() {60 findUpPath = (fileName, folderPath = process2.cwd(), maxDepth = 25) => {61 let filePath = path.normalize(path.join(folderPath, fileName));62 let depth = 1;63 while (true) {64 if (depth > maxDepth)65 return;66 if (fs.existsSync(filePath))67 return filePath;68 folderPath = path.resolve(folderPath, "..");69 const filePathNext = path.normalize(path.join(folderPath, fileName));70 if (filePathNext === filePath)71 return;72 filePath = filePathNext;73 depth += 1;74 }75 };76 dist_default = findUpPath;77 }78});79 80// node_modules/find-up-json/dist/utils.js81var attempt;82var init_utils = __esm({83 "node_modules/find-up-json/dist/utils.js"() {84 attempt = (fn, fallback) => {85 try {86 return fn();87 } catch {88 return fallback;89 }90 };91 }92});93 94// node_modules/find-up-json/dist/index.js95import { Buffer as Buffer2 } from "buffer";96import fs2 from "fs";97import process3 from "process";98var findUp, dist_default2;99var init_dist2 = __esm({100 "node_modules/find-up-json/dist/index.js"() {101 init_dist();102 init_utils();103 findUp = (fileName, folderPath = process3.cwd(), maxDepth = 25) => {104 const path18 = dist_default(fileName, folderPath, maxDepth);105 if (!path18)106 return;107 const buffer2 = attempt(() => fs2.readFileSync(path18), Buffer2.alloc(0));108 const content = attempt(() => JSON.parse(buffer2.toString()), {});109 return { path: path18, buffer: buffer2, content };110 };111 dist_default2 = findUp;112 }113});114 115// node_modules/get-current-package/dist/index.js116import fs3 from "fs";117import path2 from "path";118import process4 from "process";119var getCurrentPackage, dist_default3;120var init_dist3 = __esm({121 "node_modules/get-current-package/dist/index.js"() {122 init_dist2();123 getCurrentPackage = () => {124 try {125 const filePath = fs3.realpathSync(process4.argv[1]);126 const folderPath = path2.dirname(filePath);127 const pkg = dist_default2("package.json", folderPath);128 return pkg?.content;129 } catch {130 return;131 }132 };133 dist_default3 = getCurrentPackage;134 }135});136 137// node_modules/tiny-colors/dist/constants.js138var ENV, ARGV, ENABLED;139var init_constants = __esm({140 "node_modules/tiny-colors/dist/constants.js"() {141 ENV = globalThis.process?.env || {};142 ARGV = globalThis.process?.argv || [];143 ENABLED = !("NO_COLOR" in ENV) && ENV.COLOR !== "0" && ENV.TERM !== "dumb" && !ARGV.includes("--no-color") && !ARGV.includes("--no-colors") && (ENV.COLOR === "1" || !globalThis.process?.stdout || globalThis.process?.stdout?.isTTY === true);144 }145});146 147// node_modules/tiny-colors/dist/index.js148var chain, wrap, colors, dist_default4;149var init_dist4 = __esm({150 "node_modules/tiny-colors/dist/index.js"() {151 init_constants();152 chain = (modifier) => {153 return new Proxy(modifier, {154 get(target, prop) {155 if (prop in colors) {156 return chain((string2) => modifier(colors[prop](string2)));157 } else {158 return target[prop];159 }160 }161 });162 };163 wrap = (start, end) => {164 return chain((string2) => {165 if (!ENABLED)166 return string2;167 return `\x1B[${start}m${string2}\x1B[${end}m`;168 });169 };170 colors = {171 /* MODIFIERS */172 reset: wrap(0, 0),173 bold: wrap(1, 22),174 dim: wrap(2, 22),175 italic: wrap(3, 23),176 underline: wrap(4, 24),177 overline: wrap(53, 55),178 inverse: wrap(7, 27),179 hidden: wrap(8, 28),180 strikethrough: wrap(9, 29),181 /* FOREGOUND */182 black: wrap(30, 39),183 red: wrap(31, 39),184 green: wrap(32, 39),185 yellow: wrap(33, 39),186 blue: wrap(34, 39),187 magenta: wrap(35, 39),188 cyan: wrap(36, 39),189 white: wrap(37, 39),190 gray: wrap(90, 39),191 /* BACKGROUND */192 bgBlack: wrap(40, 49),193 bgRed: wrap(41, 49),194 bgGreen: wrap(42, 49),195 bgYellow: wrap(43, 49),196 bgBlue: wrap(44, 49),197 bgMagenta: wrap(45, 49),198 bgCyan: wrap(46, 49),199 bgWhite: wrap(47, 49),200 bgGray: wrap(100, 49)201 };202 dist_default4 = colors;203 }204});205 206// node_modules/tiny-parse-argv/dist/utils.js207var castArray, isBoolean, isNil, isNull, isOverridable, isUndefined, setNormal, setVariadic, uniq, uniqBy, without, zip;208var init_utils2 = __esm({209 "node_modules/tiny-parse-argv/dist/utils.js"() {210 castArray = (value) => {211 return Array.isArray(value) ? value : [value];212 };213 isBoolean = (value) => {214 return value === true || value === false;215 };216 isNil = (value) => {217 return value === null || value === void 0;218 };219 isNull = (value) => {220 return value === null;221 };222 isOverridable = (value) => {223 return isNil(value) || isBoolean(value) || value === "";224 };225 isUndefined = (value) => {226 return value === void 0;227 };228 setNormal = (target, key2, value, override) => {229 if (override) {230 target[key2] = value;231 } else if (Array.isArray(target[key2])) {232 target[key2].push(value);233 } else if (isOverridable(target[key2])) {234 target[key2] = value;235 } else {236 target[key2] = [target[key2], value];237 }238 };239 setVariadic = (target, key2, value, override) => {240 const values = castArray(value);241 if (override) {242 target[key2] = values;243 } else if (Array.isArray(target[key2])) {244 target[key2].push(...values);245 } else if (isOverridable(target[key2])) {246 target[key2] = values;247 } else {248 target[key2] = [target[key2], ...values];249 }250 };251 uniq = (values) => {252 return Array.from(new Set(values));253 };254 uniqBy = (values, iterator) => {255 const ids = /* @__PURE__ */ new Set();256 return values.filter((value, index, arr) => {257 const id = iterator(value, index, arr);258 if (ids.has(id))259 return false;260 ids.add(id);261 return true;262 });263 };264 without = (values, value) => {265 return values.filter((other) => other !== value);266 };267 zip = (keys, value) => {268 return Object.fromEntries(Array.from(keys).map((key2) => [key2, value]));269 };270 }271});272 273// node_modules/tiny-parse-argv/dist/index.js274var getAliasesMap, getAliasedMap, getAliasedSet, getAliasedDefaults, getAliasedIncompatibles, setAliased, parseDoubleHyphen, parseWithRegExp, parseCharSeparator, parseEqualsSeparator, parseImplicitSeparator, parseProto, parseOption, parseOptionNegation, parseValue, unquote, parseArgv, dist_default5;275var init_dist5 = __esm({276 "node_modules/tiny-parse-argv/dist/index.js"() {277 init_utils2();278 getAliasesMap = (aliases = {}) => {279 const map2 = {};280 for (const key2 in aliases) {281 const values = uniq([key2, ...aliases[key2] || []]);282 for (const value of values) {283 if (value in map2)284 continue;285 map2[value] = without(values, value);286 }287 }288 return map2;289 };290 getAliasedMap = (aliases, object) => {291 const map2 = /* @__PURE__ */ new Map();292 for (const key2 in object) {293 const value = object[key2];294 if (isUndefined(value))295 continue;296 map2.set(key2, value);297 const keyAliases = aliases[key2];298 if (!keyAliases)299 continue;300 for (const key3 of keyAliases) {301 map2.set(key3, value);302 }303 }304 return map2;305 };306 getAliasedSet = (aliases, values = []) => {307 const valuesAliases = values.flatMap((value) => aliases[value] || []);308 const valuesAliased = /* @__PURE__ */ new Set([...values, ...valuesAliases]);309 return valuesAliased;310 };311 getAliasedDefaults = (aliases, defaults = {}) => {312 const defaultsAliased = {};313 for (const key2 in defaults) {314 const value = defaults[key2];315 const keys = uniq([key2, ...aliases[key2] || []]);316 for (const key3 of keys) {317 if (key3 in defaultsAliased)318 continue;319 defaultsAliased[key3] = value;320 }321 }322 return defaultsAliased;323 };324 getAliasedIncompatibles = (aliases, incompatibles = {}) => {325 const incompatiblesAliased = {};326 for (const source2 in incompatibles) {327 const sources = getAliasedSet(aliases, [source2]);328 const targets = getAliasedSet(aliases, incompatibles[source2]);329 for (const source3 of sources) {330 for (const target of targets) {331 const sourceSet = incompatiblesAliased[source3] || (incompatiblesAliased[source3] = /* @__PURE__ */ new Set());332 const targetSet = incompatiblesAliased[target] || (incompatiblesAliased[target] = /* @__PURE__ */ new Set());333 sourceSet.add(target);334 targetSet.add(source3);335 }336 }337 }338 return incompatiblesAliased;339 };340 setAliased = (target, key2, value, unary, variadic, aliases) => {341 const set3 = variadic ? setVariadic : setNormal;342 set3(target, key2, value, unary);343 aliases[key2]?.forEach((alias) => {344 set3(target, alias, value, unary);345 });346 };347 parseDoubleHyphen = (argv) => {348 const index = argv.indexOf("--");349 if (index < 0)350 return [argv, []];351 const parse8 = argv.slice(0, index);352 const preserve = argv.slice(index + 1);353 return [parse8, preserve];354 };355 parseWithRegExp = (argv, re, callback) => {356 return argv.flatMap((arg) => {357 const match2 = re.exec(arg);358 if (!match2)359 return arg;360 return callback(...match2);361 });362 };363 parseCharSeparator = (argv) => {364 const re = /^-([a-zA-Z0-9\.]{2,})([^]*)$/;365 return parseWithRegExp(argv, re, (_, chars2) => chars2.split("").map((char) => `-${char}`));366 };367 parseEqualsSeparator = (argv) => {368 const re = /^(--?[^=][^=]*?)=([^]*)$/;369 const shieldValue = (value) => value.startsWith("-") ? `"${value}"` : value;370 return parseWithRegExp(argv, re, (_, key2, value) => [key2, shieldValue(value)]);371 };372 parseImplicitSeparator = (argv) => {373 const re = /^(--?(?:no-)?\S*?[a-zA-Z]\S*?)((?:[0-9\/]|-(?=$))[^]*)$/;374 return parseWithRegExp(argv, re, (_, key2, value) => [key2, value]);375 };376 parseProto = (argv) => {377 const re = /^--?(no-)?(__proto__|prototype|constructor)$/;378 return argv.filter((arg, index) => !re.test(arg) && !re.test(argv[index - 1]));379 };380 parseOption = (arg) => {381 const optionRe = /^(--?)([^]+)$/;382 const match2 = optionRe.exec(arg);383 if (!match2)384 return;385 return match2[2];386 };387 parseOptionNegation = (arg) => {388 const negationRe = /^no-([^]+)$/;389 const match2 = negationRe.exec(arg);390 if (!match2)391 return [arg, true];392 return [match2[1], false];393 };394 parseValue = (key2, valueRaw, booleans, integers, numbers, strings, validators) => {395 const value = unquote(String(valueRaw));396 if (validators.get(key2)?.(value) === false) {397 return null;398 }399 if (booleans.has(key2)) {400 if (value === "true")401 return true;402 if (value === "false")403 return false;404 }405 if (integers.has(key2)) {406 const integer = Number(value);407 if (Number.isInteger(integer))408 return integer;409 return null;410 }411 if (numbers.has(key2)) {412 const number = Number(value);413 if (!Number.isNaN(number))414 return number;415 return null;416 }417 if (strings.has(key2) || value !== valueRaw) {418 return value;419 }420 const numberRe = /^0[xX][0-9a-fA-F]+$|^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][-+]?\d+)?$/;421 if (numberRe.test(value)) {422 return Number(value);423 } else {424 return value;425 }426 };427 unquote = (value) => {428 return value.replace(/^(['"])(\1*)(.*)(\1\2)$/, "$3");429 };430 parseArgv = (argv, options = {}) => {431 const aliases = getAliasesMap(options.alias);432 const booleans = getAliasedSet(aliases, options.boolean);433 const integers = getAliasedSet(aliases, options.integer);434 const numbers = getAliasedSet(aliases, options.number);435 const strings = getAliasedSet(aliases, options.string);436 const eagers = getAliasedSet(aliases, options.eager);437 const unarys = getAliasedSet(aliases, options.unary);438 const variadics = getAliasedSet(aliases, options.variadic);439 const defaults = getAliasedDefaults(aliases, options.default);440 const incompatibles = getAliasedIncompatibles(aliases, options.incompatible);441 const validators = getAliasedMap(aliases, options.validators);442 const required = options.required || [];443 const known = /* @__PURE__ */ new Set([...booleans, ...integers, ...numbers, ...strings, ...Object.keys(defaults)]);444 const found = [];445 const onIncompatible = options.onIncompatible;446 const onInvalid = options.onInvalid;447 const onMissing = options.onMissing;448 const onUnknown = options.onUnknown;449 const [parse8, preserve] = parseDoubleHyphen(argv);450 const parsed = { _: [], "--": preserve };451 const args = parseCharSeparator(parseImplicitSeparator(parseEqualsSeparator(parseProto(parse8))));452 let optionPrev = "";453 let optionEagerPrev = "";454 for (let i = 0, l = args.length; i < l; i++) {455 const arg = args[i];456 const option = parseOption(arg);457 if (option) {458 const [key2, positive] = parseOptionNegation(option);459 if (isOverridable(parsed[key2])) {460 if (!integers.has(key2) && !numbers.has(key2) && !strings.has(key2)) {461 const unary = unarys.has(key2);462 const variadic = variadics.has(key2);463 const value = variadic ? [positive] : positive;464 setAliased(parsed, key2, value, unary, variadic, aliases);465 }466 }467 found.push(key2);468 optionPrev = option;469 optionEagerPrev = eagers.has(key2) ? option : "";470 } else {471 const value = parseValue(optionPrev, arg, booleans, integers, numbers, strings, validators);472 if (optionPrev && (!booleans.has(optionPrev) || isBoolean(value))) {473 if (!isNull(value)) {474 const unary = unarys.has(optionPrev);475 const variadic = variadics.has(optionPrev);476 setAliased(parsed, optionPrev, value, unary, variadic, aliases);477 }478 } else if (optionEagerPrev && !booleans.has(optionEagerPrev)) {479 if (!isNull(value)) {480 const unary = unarys.has(optionEagerPrev);481 const variadic = variadics.has(optionEagerPrev);482 setAliased(parsed, optionEagerPrev, value, unary, variadic, aliases);483 }484 } else {485 parsed._.push(String(value ?? arg));486 optionEagerPrev = "";487 }488 optionPrev = "";489 }490 }491 const parsedWithDefaults = { ...defaults, ...parsed };492 const parsedWithDefaultsAndBooleans = { ...zip(booleans, false), ...parsedWithDefaults };493 if (onUnknown) {494 const unknowns = Object.keys(parsedWithDefaults).filter((key2) => key2 !== "_" && key2 !== "--" && !known.has(key2));495 if (unknowns.length) {496 onUnknown(unknowns);497 }498 }499 if (onMissing) {500 const missings = required.filter((key2) => !(key2 in parsedWithDefaults));501 if (missings.length) {502 onMissing(missings);503 }504 }505 if (onInvalid) {506 const invalids = found.filter((key2) => parsedWithDefaults[key2] === void 0);507 if (invalids.length) {508 onInvalid(invalids);509 }510 }511 if (onIncompatible) {512 const options2 = uniq(found);513 const pairs2 = [];514 for (let si = 0, sl = options2.length; si < sl; si++) {515 const source2 = options2[si];516 const sourceIncompatibles = incompatibles[source2];517 if (!sourceIncompatibles)518 continue;519 for (let ti = si + 1, tl = sl; ti < tl; ti++) {520 const target = options2[ti];521 if (!sourceIncompatibles.has(target))522 continue;523 pairs2.push([source2, target]);524 }525 }526 if (pairs2.length) {527 const pairsUnique = uniqBy(pairs2, (pair) => [...pair].sort().join());528 onIncompatible(pairsUnique);529 }530 }531 return parsedWithDefaultsAndBooleans;532 };533 dist_default5 = parseArgv;534 }535});536 537// node_modules/ionstore/dist/utils.js538var attempt2;539var init_utils3 = __esm({540 "node_modules/ionstore/dist/utils.js"() {541 attempt2 = (fn, fallback) => {542 try {543 return fn();544 } catch {545 return fallback;546 }547 };548 }549});550 551// node_modules/ionstore/dist/abstract.js552var __classPrivateFieldSet, __classPrivateFieldGet, _AbstractStore_save, AbstractStore, abstract_default;553var init_abstract = __esm({554 "node_modules/ionstore/dist/abstract.js"() {555 init_utils3();556 __classPrivateFieldSet = function(receiver, state, value, kind, f) {557 if (kind === "m") throw new TypeError("Private method is not writable");558 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");559 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");560 return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;561 };562 __classPrivateFieldGet = function(receiver, state, kind, f) {563 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");564 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");565 return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);566 };567 AbstractStore = class extends Map {568 /* CONSTRUCTOR */569 constructor(options) {570 super();571 _AbstractStore_save.set(this, void 0);572 const { id, backend } = options;573 if (!/^[a-zA-Z0-9_-]+$/.test(id))574 throw new Error(`Invalid store id: "${id}"`);575 const read3 = () => attempt2(() => backend.read(id), []);576 const write = () => attempt2(() => backend.write(id, this.entries()), null);577 for (const [key2, value] of read3()) {578 super.set(key2, value);579 }580 __classPrivateFieldSet(this, _AbstractStore_save, write, "f");581 return this;582 }583 /* API */584 clear() {585 if (!this.size)586 return;587 super.clear();588 __classPrivateFieldGet(this, _AbstractStore_save, "f").call(this);589 }590 delete(key2) {591 const deleted = super.delete(key2);592 if (!deleted)593 return false;594 __classPrivateFieldGet(this, _AbstractStore_save, "f").call(this);595 return true;596 }597 set(key2, value) {598 const valuePrev = this.get(key2);599 if (value === valuePrev)600 return this;601 super.set(key2, value);602 __classPrivateFieldGet(this, _AbstractStore_save, "f").call(this);603 return this;604 }605 };606 _AbstractStore_save = /* @__PURE__ */ new WeakMap();607 abstract_default = AbstractStore;608 }609});610 611// node_modules/ionstore/dist/node.js612import fs4 from "fs";613import os from "os";614import path3 from "path";615var NodeStore, node_default;616var init_node = __esm({617 "node_modules/ionstore/dist/node.js"() {618 init_abstract();619 NodeStore = class extends abstract_default {620 /* CONSTRUCTOR */621 constructor(id) {622 super({623 id,624 backend: {625 read: (id2) => {626 const filePath = path3.join(os.tmpdir(), `ionstore_${id2}.json`);627 const content = fs4.readFileSync(filePath, "utf8");628 return JSON.parse(content);629 },630 write: (id2, data) => {631 const filePath = path3.join(os.tmpdir(), `ionstore_${id2}.json`);632 const content = JSON.stringify(Array.from(data));633 return fs4.writeFileSync(filePath, content);634 }635 }636 });637 }638 };639 node_default = NodeStore;640 }641});642 643// node_modules/when-exit/dist/node/constants.js644import process5 from "process";645var IS_LINUX, IS_WINDOWS;646var init_constants2 = __esm({647 "node_modules/when-exit/dist/node/constants.js"() {648 IS_LINUX = process5.platform === "linux";649 IS_WINDOWS = process5.platform === "win32";650 }651});652 653// node_modules/when-exit/dist/node/signals.js654var Signals, signals_default;655var init_signals = __esm({656 "node_modules/when-exit/dist/node/signals.js"() {657 init_constants2();658 Signals = ["SIGHUP", "SIGINT", "SIGTERM"];659 if (!IS_WINDOWS) {660 Signals.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");661 }662 if (IS_LINUX) {663 Signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");664 }665 signals_default = Signals;666 }667});668 669// node_modules/when-exit/dist/node/interceptor.js670import process6 from "process";671var Interceptor, interceptor_default;672var init_interceptor = __esm({673 "node_modules/when-exit/dist/node/interceptor.js"() {674 init_constants2();675 init_signals();676 Interceptor = class {677 /* CONSTRUCTOR */678 constructor() {679 this.callbacks = /* @__PURE__ */ new Set();680 this.exited = false;681 this.exit = (signal) => {682 if (this.exited)683 return;684 this.exited = true;685 for (const callback of this.callbacks) {686 callback();687 }688 if (signal) {689 if (IS_WINDOWS && (signal !== "SIGINT" && signal !== "SIGTERM" && signal !== "SIGKILL")) {690 process6.kill(process6.pid, "SIGTERM");691 } else {692 process6.kill(process6.pid, signal);693 }694 }695 };696 this.hook = () => {697 process6.once("exit", () => this.exit());698 for (const signal of signals_default) {699 try {700 process6.once(signal, () => this.exit(signal));701 } catch {702 }703 }704 };705 this.register = (callback) => {706 this.callbacks.add(callback);707 return () => {708 this.callbacks.delete(callback);709 };710 };711 this.hook();712 }713 };714 interceptor_default = new Interceptor();715 }716});717 718// node_modules/when-exit/dist/node/index.js719var whenExit, node_default2;720var init_node2 = __esm({721 "node_modules/when-exit/dist/node/index.js"() {722 init_interceptor();723 whenExit = interceptor_default.register;724 node_default2 = whenExit;725 }726});727 728// node_modules/tiny-updater/dist/compare.js729var compare, compare_default;730var init_compare = __esm({731 "node_modules/tiny-updater/dist/compare.js"() {732 compare = (a, b) => {733 const pa = a.split(".");734 const pb = b.split(".");735 for (let i = 0; i < 3; i++) {736 let na = Number(pa[i]);737 let nb = Number(pb[i]);738 if (na > nb)739 return 1;740 if (nb > na)741 return -1;742 if (!isNaN(na) && isNaN(nb))743 return 1;744 if (isNaN(na) && !isNaN(nb))745 return -1;746 }747 return 0;748 };749 compare_default = compare;750 }751});752 753// node_modules/tiny-updater/dist/utils.js754var Utils, utils_default;755var init_utils4 = __esm({756 "node_modules/tiny-updater/dist/utils.js"() {757 init_dist4();758 init_node2();759 init_compare();760 Utils = {761 /* API */762 fetch: async (url3) => {763 const signal = Utils.getExitSignal();764 const request = await fetch(url3, { signal });765 const json2 = await request.json();766 return json2;767 },768 getExitSignal: () => {769 const aborter = new AbortController();770 node_default2(() => aborter.abort());771 return aborter.signal;772 },773 getLatestVersion: async (name) => {774 const latestUrl = `https://registry.npmjs.org/${name}/latest`;775 const latest = await Utils.fetch(latestUrl);776 return latest.version;777 },778 isNumber: (value) => {779 return typeof value === "number";780 },781 isString: (value) => {782 return typeof value === "string";783 },784 isUpdateAvailable: (current, latest) => {785 return compare_default(current, latest) === -1;786 },787 noop: () => {788 return;789 },790 notify: (name, version, latest) => {791 if (!globalThis.process?.stdout?.isTTY)792 return;793 const log = () => console.log(`794 795\u{1F4E6} Update available for ${dist_default4.cyan(name)}: ${dist_default4.gray(version)} \u2192 ${dist_default4.green(latest)}`);796 node_default2(log);797 }798 };799 utils_default = Utils;800 }801});802 803// node_modules/tiny-updater/dist/store.js804var Store, store_default;805var init_store = __esm({806 "node_modules/tiny-updater/dist/store.js"() {807 init_node();808 init_utils4();809 Store = class {810 constructor() {811 this.store = new node_default("tiny-updater");812 this.get = (name) => {813 try {814 const recordRaw = this.store.get(name);815 if (!recordRaw)816 return;817 const record = JSON.parse(recordRaw);818 if (!utils_default.isNumber(record.timestampFetch))819 return;820 if (!utils_default.isNumber(record.timestampNotification))821 return;822 if (!utils_default.isString(record.version))823 return;824 return record;825 } catch {826 return;827 }828 };829 this.set = (name, record) => {830 this.store.set(name, JSON.stringify(record));831 };832 }833 };834 store_default = new Store();835 }836});837 838// node_modules/tiny-updater/dist/index.js839var updater, dist_default6;840var init_dist6 = __esm({841 "node_modules/tiny-updater/dist/index.js"() {842 init_store();843 init_utils4();844 updater = async ({ name, version, ttl = 0 }) => {845 const record = store_default.get(name);846 const timestamp2 = Date.now();847 const isFresh = !record || timestamp2 - record.timestampFetch >= ttl;848 const latest = isFresh ? await utils_default.getLatestVersion(name).catch(utils_default.noop) : record?.version;849 if (!latest)850 return false;851 if (isFresh) {852 const record2 = { timestampFetch: timestamp2, timestampNotification: timestamp2, version: latest };853 store_default.set(name, record2);854 }855 if (!utils_default.isUpdateAvailable(version, latest)) {856 return false;857 }858 if (isFresh) {859 utils_default.notify(name, version, latest);860 }861 return true;862 };863 dist_default6 = updater;864 }865});866 867// node_modules/fast-string-truncated-width/dist/utils.js868var getCodePointsLength, isFullWidth, isWideNotCJKTNotEmoji;869var init_utils5 = __esm({870 "node_modules/fast-string-truncated-width/dist/utils.js"() {871 getCodePointsLength = /* @__PURE__ */ (() => {872 const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;873 return (input) => {874 let surrogatePairsNr = 0;875 SURROGATE_PAIR_RE.lastIndex = 0;876 while (SURROGATE_PAIR_RE.test(input)) {877 surrogatePairsNr += 1;878 }879 return input.length - surrogatePairsNr;880 };881 })();882 isFullWidth = (x) => {883 return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;884 };885 isWideNotCJKTNotEmoji = (x) => {886 return x === 8987 || x === 9001 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;887 };888 }889});890 891// node_modules/fast-string-truncated-width/dist/index.js892var ANSI_RE, CONTROL_RE, CJKT_WIDE_RE, TAB_RE, EMOJI_RE, LATIN_RE, MODIFIER_RE, NO_TRUNCATION, getStringTruncatedWidth, dist_default7;893var init_dist7 = __esm({894 "node_modules/fast-string-truncated-width/dist/index.js"() {895 init_method_replace_all();896 init_utils5();897 ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y;898 CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;899 CJKT_WIDE_RE = /(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu;900 TAB_RE = /\t{1,1000}/y;901 EMOJI_RE = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu;902 LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;903 MODIFIER_RE = /\p{M}+/gu;904 NO_TRUNCATION = {905 limit: Infinity,906 ellipsis: ""907 };908 getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {}) => {909 const LIMIT = truncationOptions.limit ?? Infinity;910 const ELLIPSIS2 = truncationOptions.ellipsis ?? "";911 const ELLIPSIS_WIDTH2 = truncationOptions?.ellipsisWidth ?? (ELLIPSIS2 ? getStringTruncatedWidth(ELLIPSIS2, NO_TRUNCATION, widthOptions).width : 0);912 const ANSI_WIDTH = 0;913 const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;914 const TAB_WIDTH = widthOptions.tabWidth ?? 8;915 const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;916 const FULL_WIDTH_WIDTH = 2;917 const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;918 const WIDE_WIDTH = widthOptions.wideWidth ?? FULL_WIDTH_WIDTH;919 const PARSE_BLOCKS = [[LATIN_RE, REGULAR_WIDTH], [ANSI_RE, ANSI_WIDTH], [CONTROL_RE, CONTROL_WIDTH], [TAB_RE, TAB_WIDTH], [EMOJI_RE, EMOJI_WIDTH], [CJKT_WIDE_RE, WIDE_WIDTH]];920 let indexPrev = 0;921 let index = 0;922 let length = input.length;923 let lengthExtra = 0;924 let truncationEnabled = false;925 let truncationIndex = length;926 let truncationLimit = Math.max(0, LIMIT - ELLIPSIS_WIDTH2);927 let unmatchedStart = 0;928 let unmatchedEnd = 0;929 let width = 0;930 let widthExtra = 0;931 outer: while (true) {932 if (unmatchedEnd > unmatchedStart || index >= length && index > indexPrev) {933 const unmatched = input.slice(unmatchedStart, unmatchedEnd) || input.slice(indexPrev, index);934 lengthExtra = 0;935 for (const char of method_replace_all_default(936 /* OPTIONAL_OBJECT: false */937 0,938 unmatched,939 MODIFIER_RE,940 ""941 )) {942 const codePoint = char.codePointAt(0) || 0;943 if (isFullWidth(codePoint)) {944 widthExtra = FULL_WIDTH_WIDTH;945 } else if (isWideNotCJKTNotEmoji(codePoint)) {946 widthExtra = WIDE_WIDTH;947 } else {948 widthExtra = REGULAR_WIDTH;949 }950 if (width + widthExtra > truncationLimit) {951 truncationIndex = Math.min(truncationIndex, Math.max(unmatchedStart, indexPrev) + lengthExtra);952 }953 if (width + widthExtra > LIMIT) {954 truncationEnabled = true;955 break outer;956 }957 lengthExtra += char.length;958 width += widthExtra;959 }960 unmatchedStart = unmatchedEnd = 0;961 }962 if (index >= length) {963 break outer;964 }965 for (let i = 0, l = PARSE_BLOCKS.length; i < l; i++) {966 const [BLOCK_RE, BLOCK_WIDTH] = PARSE_BLOCKS[i];967 BLOCK_RE.lastIndex = index;968 if (BLOCK_RE.test(input)) {969 lengthExtra = BLOCK_RE === CJKT_WIDE_RE ? getCodePointsLength(input.slice(index, BLOCK_RE.lastIndex)) : BLOCK_RE === EMOJI_RE ? 1 : BLOCK_RE.lastIndex - index;970 widthExtra = lengthExtra * BLOCK_WIDTH;971 if (width + widthExtra > truncationLimit) {972 truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / BLOCK_WIDTH));973 }974 if (width + widthExtra > LIMIT) {975 truncationEnabled = true;976 break outer;977 }978 width += widthExtra;979 unmatchedStart = indexPrev;980 unmatchedEnd = index;981 index = indexPrev = BLOCK_RE.lastIndex;982 continue outer;983 }984 }985 index += 1;986 }987 return {988 width: truncationEnabled ? truncationLimit : width,989 index: truncationEnabled ? truncationIndex : length,990 truncated: truncationEnabled,991 ellipsed: truncationEnabled && LIMIT >= ELLIPSIS_WIDTH2992 };993 };994 dist_default7 = getStringTruncatedWidth;995 }996});997 998// node_modules/fast-string-width/dist/index.js999var NO_TRUNCATION2, fastStringWidth, dist_default8;1000var init_dist8 = __esm({1001 "node_modules/fast-string-width/dist/index.js"() {1002 init_dist7();1003 NO_TRUNCATION2 = {1004 limit: Infinity,1005 ellipsis: "",1006 ellipsisWidth: 01007 };1008 fastStringWidth = (input, options = {}) => {1009 return dist_default7(input, NO_TRUNCATION2, options).width;1010 };1011 dist_default8 = fastStringWidth;1012 }1013});1014 1015// node_modules/tiny-bin/dist/objects/addon.js1016var Addon, addon_default;1017var init_addon = __esm({1018 "node_modules/tiny-bin/dist/objects/addon.js"() {1019 Addon = class {1020 /* CONSTRUCTOR */1021 constructor(bin2) {1022 this.bin = bin2;1023 this.stdout = bin2.stdout;1024 this.stderr = bin2.stderr;1025 }1026 };1027 addon_default = Addon;1028 }1029});1030 1031// node_modules/ansi-purge/dist/constants.js1032var ANSI_RE2;1033var init_constants3 = __esm({1034 "node_modules/ansi-purge/dist/constants.js"() {1035 ANSI_RE2 = /([\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c))/g;1036 }1037});1038 1039// node_modules/ansi-purge/dist/index.js1040var purge, dist_default9;1041var init_dist9 = __esm({1042 "node_modules/ansi-purge/dist/index.js"() {1043 init_constants3();1044 purge = (str2) => {1045 return str2.replace(ANSI_RE2, "");1046 };1047 dist_default9 = purge;1048 }1049});1050 1051// node_modules/tiny-levenshtein/dist/matrix.js1052var Matrix, matrix_default;1053var init_matrix = __esm({1054 "node_modules/tiny-levenshtein/dist/matrix.js"() {1055 Matrix = class {1056 /* CONSTRUCTOR */1057 constructor(rows, columns, Buffer3 = Uint32Array) {1058 this.rows = rows;1059 this.columns = columns;1060 this.buffer = new Buffer3(this.rows * this.columns);1061 }1062 /* API */1063 get(row, column2) {1064 const index = row * this.columns + column2;1065 return this.buffer[index];1066 }1067 set(row, column2, value) {1068 const index = row * this.columns + column2;1069 return this.buffer[index] = value;1070 }1071 };1072 matrix_default = Matrix;1073 }1074});1075 1076// node_modules/tiny-levenshtein/dist/index.js1077var levenshtein, dist_default10;1078var init_dist10 = __esm({1079 "node_modules/tiny-levenshtein/dist/index.js"() {1080 init_matrix();1081 levenshtein = (a, b) => {1082 if (a === b)1083 return 0;1084 let start = 0;1085 let aEnd = a.length - 1;1086 let bEnd = b.length - 1;1087 while (start <= aEnd && start <= bEnd) {1088 if (a[start] !== b[start])1089 break;1090 start += 1;1091 }1092 while (aEnd >= start && bEnd >= start) {1093 if (a[aEnd] !== b[bEnd])1094 break;1095 aEnd -= 1;1096 bEnd -= 1;1097 }1098 const aLength = aEnd - start + 1;1099 const bLength = bEnd - start + 1;1100 if (!aLength)1101 return bLength;1102 if (!bLength)1103 return aLength;1104 const maxDistance = Math.max(aLength, bLength);1105 const Buffer3 = maxDistance < 255 ? Uint8Array : maxDistance < 65535 ? Uint16Array : Uint32Array;1106 const matrix = new matrix_default(aLength + 1, bLength + 1, Buffer3);1107 for (let i = 1, l = aLength; i <= l; i++) {1108 matrix.set(i, 0, i);1109 }1110 for (let i = 1, l = bLength; i <= l; i++) {1111 matrix.set(0, i, i);1112 }1113 for (let i = 1; i <= aLength; i++) {1114 for (let j = 1; j <= bLength; j++) {1115 const cost = a[start + i - 1] === b[start + j - 1] ? 0 : 1;1116 const deletion = matrix.get(i - 1, j) + 1;1117 const insertion = matrix.get(i, j - 1) + 1;1118 const substitution = matrix.get(i - 1, j - 1) + cost;1119 const value = Math.min(deletion, insertion, substitution);1120 matrix.set(i, j, value);1121 }1122 }1123 const distance = matrix.get(aLength, bLength);1124 return distance;1125 };1126 dist_default10 = levenshtein;1127 }1128});1129 1130// node_modules/tiny-bin/dist/utils.js1131var camelCase, castArray2, defer, getClosest, groupBy, identity, isArray, isUndefined2, pushBack, sum;1132var init_utils6 = __esm({1133 "node_modules/tiny-bin/dist/utils.js"() {1134 init_dist9();1135 init_dist10();1136 camelCase = /* @__PURE__ */ (() => {1137 const dividerRe = /[_.\s-]+/g;1138 const prefixRe = /^[_.\s-]+/g;1139 const upperDigitRe = /\d+[\p{Alpha}\p{N}_]/gu;1140 const upperDividerRe = /[_.\s-]+[\p{Alpha}\p{N}_]/gu;1141 const toUpperCase = (str2) => str2.toUpperCase();1142 return (str2) => {1143 return str2.trim().toLowerCase().replace(prefixRe, "").replace(upperDigitRe, toUpperCase).replace(upperDividerRe, toUpperCase).replace(dividerRe, "");1144 };1145 })();1146 castArray2 = (value) => {1147 return Array.isArray(value) ? value : [value];1148 };1149 defer = (fn) => {1150 setTimeout(fn, 0);1151 };1152 getClosest = (values, value, maxDistance = 3, caseInsensitive = false) => {1153 if (!values.length)1154 return;1155 const target = caseInsensitive ? value.toLowerCase() : value;1156 const targets = caseInsensitive ? values.map((value2) => value2.toLowerCase()) : values;1157 const distances = targets.map((other) => dist_default10(target, other));1158 const minDistance = Math.min(...distances);1159 if (minDistance > maxDistance)1160 return;1161 const minDistanceIndex = distances.indexOf(minDistance);1162 const closest = values[minDistanceIndex];1163 return closest;1164 };1165 groupBy = (values, iterator) => {1166 const groups = /* @__PURE__ */ new Map();1167 for (let i = 0, l = values.length; i < l; i++) {1168 const value = values[i];1169 const key2 = iterator(value, i, values);1170 const group = groups.get(key2) || [];1171 group.push(value);1172 groups.set(key2, group);1173 }1174 return groups;1175 };1176 identity = (value) => {1177 return value;1178 };1179 isArray = (value) => {1180 return Array.isArray(value);1181 };1182 isUndefined2 = (value) => {1183 return value === void 0;1184 };1185 pushBack = (map2, key2) => {1186 const value = map2.get(key2);1187 if (isUndefined2(value))1188 return map2;1189 map2.delete(key2);1190 map2.set(key2, value);1191 return map2;1192 };1193 sum = (numbers) => {1194 return numbers.reduce((acc, value) => acc + value, 0);1195 };1196 }1197});1198 1199// node_modules/tiny-bin/dist/objects/logger.js1200var Logger, logger_default;