| Server IP : 170.10.162.208 / Your IP : 216.73.216.38 Web Server : LiteSpeed System : Linux altar19.supremepanel19.com 4.18.0-553.69.1.lve.el8.x86_64 #1 SMP Wed Aug 13 19:53:59 UTC 2025 x86_64 User : deltahospital ( 1806) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/deltahospital/nodevenv/api.delta-hospital.com/20/lib/node_modules/consola/dist/ |
Upload File : |
import { c as colorize } from './shared/consola.DXBYu-KD.mjs';
export { b as align, d as box, a as centerAlign, e as colors, g as getColor, l as leftAlign, r as rightAlign, s as stripAnsi } from './shared/consola.DXBYu-KD.mjs';
import 'node:tty';
function formatTree(items, options) {
options = {
prefix: " ",
ellipsis: "...",
...options
};
const tree = _buildTree(items, options).join("");
if (options && options.color) {
return colorize(options.color, tree);
}
return tree;
}
function _buildTree(items, options) {
const chunks = [];
const total = items.length - 1;
for (let i = 0; i <= total; i++) {
const item = items[i];
const isItemString = typeof item === "string";
const isLimit = options?.maxDepth != null && options.maxDepth <= 0;
if (isLimit) {
const ellipsis = `${options.prefix}${options.ellipsis}
`;
return [
isItemString ? ellipsis : item.color ? colorize(item.color, ellipsis) : ellipsis
// prettier-ignore
];
}
const isLast = i === total;
const prefix = isLast ? `${options?.prefix}\u2514\u2500` : `${options?.prefix}\u251C\u2500`;
if (isItemString) {
chunks.push(`${prefix}${item}
`);
} else {
const log = `${prefix}${item.text}
`;
chunks.push(item.color ? colorize(item.color, log) : log);
if (item.children) {
const _tree = _buildTree(item.children, {
...options,
maxDepth: options?.maxDepth == null ? void 0 : options.maxDepth - 1,
prefix: `${options?.prefix}${isLast ? " " : "\u2502 "}`
});
chunks.push(..._tree);
}
}
}
return chunks;
}
export { colorize, formatTree };