mermaid
Version:
Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.
1,321 lines (1,304 loc) • 6.31 MB
JavaScript
"use strict";
var __esbuild_esm_mermaid = (() => {
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, value2) => __defProp(target, "name", { value: value2, configurable: true });
var __esm = (fn3, res) => function __init() {
return fn3 && (res = (0, fn3[__getOwnPropNames(fn3)[0]])(fn3 = 0)), res;
};
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from2, except, desc) => {
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
for (let key of __getOwnPropNames(from2))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
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
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// ../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js
var require_dayjs_min = __commonJS({
"../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js"(exports2, module2) {
"use strict";
!function(t4, e3) {
"object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = e3() : "function" == typeof define && define.amd ? define(e3) : (t4 = "undefined" != typeof globalThis ? globalThis : t4 || self).dayjs = e3();
}(exports2, function() {
"use strict";
var t4 = 1e3, e3 = 6e4, n2 = 36e5, r2 = "millisecond", i2 = "second", s2 = "minute", u2 = "hour", a2 = "day", o2 = "week", c3 = "month", f2 = "quarter", h2 = "year", d2 = "date", l2 = "Invalid Date", $3 = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y5 = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M2 = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: /* @__PURE__ */ __name(function(t5) {
var e4 = ["th", "st", "nd", "rd"], n3 = t5 % 100;
return "[" + t5 + (e4[(n3 - 20) % 10] || e4[n3] || e4[0]) + "]";
}, "ordinal") }, m2 = /* @__PURE__ */ __name(function(t5, e4, n3) {
var r3 = String(t5);
return !r3 || r3.length >= e4 ? t5 : "" + Array(e4 + 1 - r3.length).join(n3) + t5;
}, "m"), v3 = { s: m2, z: /* @__PURE__ */ __name(function(t5) {
var e4 = -t5.utcOffset(), n3 = Math.abs(e4), r3 = Math.floor(n3 / 60), i3 = n3 % 60;
return (e4 <= 0 ? "+" : "-") + m2(r3, 2, "0") + ":" + m2(i3, 2, "0");
}, "z"), m: /* @__PURE__ */ __name(function t5(e4, n3) {
if (e4.date() < n3.date()) return -t5(n3, e4);
var r3 = 12 * (n3.year() - e4.year()) + (n3.month() - e4.month()), i3 = e4.clone().add(r3, c3), s3 = n3 - i3 < 0, u3 = e4.clone().add(r3 + (s3 ? -1 : 1), c3);
return +(-(r3 + (n3 - i3) / (s3 ? i3 - u3 : u3 - i3)) || 0);
}, "t"), a: /* @__PURE__ */ __name(function(t5) {
return t5 < 0 ? Math.ceil(t5) || 0 : Math.floor(t5);
}, "a"), p: /* @__PURE__ */ __name(function(t5) {
return { M: c3, y: h2, w: o2, d: a2, D: d2, h: u2, m: s2, s: i2, ms: r2, Q: f2 }[t5] || String(t5 || "").toLowerCase().replace(/s$/, "");
}, "p"), u: /* @__PURE__ */ __name(function(t5) {
return void 0 === t5;
}, "u") }, g2 = "en", D3 = {};
D3[g2] = M2;
var p3 = "$isDayjsObject", S3 = /* @__PURE__ */ __name(function(t5) {
return t5 instanceof _2 || !(!t5 || !t5[p3]);
}, "S"), w3 = /* @__PURE__ */ __name(function t5(e4, n3, r3) {
var i3;
if (!e4) return g2;
if ("string" == typeof e4) {
var s3 = e4.toLowerCase();
D3[s3] && (i3 = s3), n3 && (D3[s3] = n3, i3 = s3);
var u3 = e4.split("-");
if (!i3 && u3.length > 1) return t5(u3[0]);
} else {
var a3 = e4.name;
D3[a3] = e4, i3 = a3;
}
return !r3 && i3 && (g2 = i3), i3 || !r3 && g2;
}, "t"), O2 = /* @__PURE__ */ __name(function(t5, e4) {
if (S3(t5)) return t5.clone();
var n3 = "object" == typeof e4 ? e4 : {};
return n3.date = t5, n3.args = arguments, new _2(n3);
}, "O"), b2 = v3;
b2.l = w3, b2.i = S3, b2.w = function(t5, e4) {
return O2(t5, { locale: e4.$L, utc: e4.$u, x: e4.$x, $offset: e4.$offset });
};
var _2 = function() {
function M3(t5) {
this.$L = w3(t5.locale, null, true), this.parse(t5), this.$x = this.$x || t5.x || {}, this[p3] = true;
}
__name(M3, "M");
var m3 = M3.prototype;
return m3.parse = function(t5) {
this.$d = function(t6) {
var e4 = t6.date, n3 = t6.utc;
if (null === e4) return /* @__PURE__ */ new Date(NaN);
if (b2.u(e4)) return /* @__PURE__ */ new Date();
if (e4 instanceof Date) return new Date(e4);
if ("string" == typeof e4 && !/Z$/i.test(e4)) {
var r3 = e4.match($3);
if (r3) {
var i3 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
return n3 ? new Date(Date.UTC(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3);
}
}
return new Date(e4);
}(t5), this.init();
}, m3.init = function() {
var t5 = this.$d;
this.$y = t5.getFullYear(), this.$M = t5.getMonth(), this.$D = t5.getDate(), this.$W = t5.getDay(), this.$H = t5.getHours(), this.$m = t5.getMinutes(), this.$s = t5.getSeconds(), this.$ms = t5.getMilliseconds();
}, m3.$utils = function() {
return b2;
}, m3.isValid = function() {
return !(this.$d.toString() === l2);
}, m3.isSame = function(t5, e4) {
var n3 = O2(t5);
return this.startOf(e4) <= n3 && n3 <= this.endOf(e4);
}, m3.isAfter = function(t5, e4) {
return O2(t5) < this.startOf(e4);
}, m3.isBefore = function(t5, e4) {
return this.endOf(e4) < O2(t5);
}, m3.$g = function(t5, e4, n3) {
return b2.u(t5) ? this[e4] : this.set(n3, t5);
}, m3.unix = function() {
return Math.floor(this.valueOf() / 1e3);
}, m3.valueOf = function() {
return this.$d.getTime();
}, m3.startOf = function(t5, e4) {
var n3 = this, r3 = !!b2.u(e4) || e4, f3 = b2.p(t5), l3 = /* @__PURE__ */ __name(function(t6, e6) {
var i3 = b2.w(n3.$u ? Date.UTC(n3.$y, e6, t6) : new Date(n3.$y, e6, t6), n3);
return r3 ? i3 : i3.endOf(a2);
}, "l"), $4 = /* @__PURE__ */ __name(function(t6, e6) {
return b2.w(n3.toDate()[t6].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e6)), n3);
}, "$"), y6 = this.$W, M4 = this.$M, m4 = this.$D, v4 = "set" + (this.$u ? "UTC" : "");
switch (f3) {
case h2:
return r3 ? l3(1, 0) : l3(31, 11);
case c3:
return r3 ? l3(1, M4) : l3(0, M4 + 1);
case o2:
var g3 = this.$locale().weekStart || 0, D4 = (y6 < g3 ? y6 + 7 : y6) - g3;
return l3(r3 ? m4 - D4 : m4 + (6 - D4), M4);
case a2:
case d2:
return $4(v4 + "Hours", 0);
case u2:
return $4(v4 + "Minutes", 1);
case s2:
return $4(v4 + "Seconds", 2);
case i2:
return $4(v4 + "Milliseconds", 3);
default:
return this.clone();
}
}, m3.endOf = function(t5) {
return this.startOf(t5, false);
}, m3.$set = function(t5, e4) {
var n3, o3 = b2.p(t5), f3 = "set" + (this.$u ? "UTC" : ""), l3 = (n3 = {}, n3[a2] = f3 + "Date", n3[d2] = f3 + "Date", n3[c3] = f3 + "Month", n3[h2] = f3 + "FullYear", n3[u2] = f3 + "Hours", n3[s2] = f3 + "Minutes", n3[i2] = f3 + "Seconds", n3[r2] = f3 + "Milliseconds", n3)[o3], $4 = o3 === a2 ? this.$D + (e4 - this.$W) : e4;
if (o3 === c3 || o3 === h2) {
var y6 = this.clone().set(d2, 1);
y6.$d[l3]($4), y6.init(), this.$d = y6.set(d2, Math.min(this.$D, y6.daysInMonth())).$d;
} else l3 && this.$d[l3]($4);
return this.init(), this;
}, m3.set = function(t5, e4) {
return this.clone().$set(t5, e4);
}, m3.get = function(t5) {
return this[b2.p(t5)]();
}, m3.add = function(r3, f3) {
var d3, l3 = this;
r3 = Number(r3);
var $4 = b2.p(f3), y6 = /* @__PURE__ */ __name(function(t5) {
var e4 = O2(l3);
return b2.w(e4.date(e4.date() + Math.round(t5 * r3)), l3);
}, "y");
if ($4 === c3) return this.set(c3, this.$M + r3);
if ($4 === h2) return this.set(h2, this.$y + r3);
if ($4 === a2) return y6(1);
if ($4 === o2) return y6(7);
var M4 = (d3 = {}, d3[s2] = e3, d3[u2] = n2, d3[i2] = t4, d3)[$4] || 1, m4 = this.$d.getTime() + r3 * M4;
return b2.w(m4, this);
}, m3.subtract = function(t5, e4) {
return this.add(-1 * t5, e4);
}, m3.format = function(t5) {
var e4 = this, n3 = this.$locale();
if (!this.isValid()) return n3.invalidDate || l2;
var r3 = t5 || "YYYY-MM-DDTHH:mm:ssZ", i3 = b2.z(this), s3 = this.$H, u3 = this.$m, a3 = this.$M, o3 = n3.weekdays, c4 = n3.months, f3 = n3.meridiem, h3 = /* @__PURE__ */ __name(function(t6, n4, i4, s4) {
return t6 && (t6[n4] || t6(e4, r3)) || i4[n4].slice(0, s4);
}, "h"), d3 = /* @__PURE__ */ __name(function(t6) {
return b2.s(s3 % 12 || 12, t6, "0");
}, "d"), $4 = f3 || function(t6, e6, n4) {
var r4 = t6 < 12 ? "AM" : "PM";
return n4 ? r4.toLowerCase() : r4;
};
return r3.replace(y5, function(t6, r4) {
return r4 || function(t7) {
switch (t7) {
case "YY":
return String(e4.$y).slice(-2);
case "YYYY":
return b2.s(e4.$y, 4, "0");
case "M":
return a3 + 1;
case "MM":
return b2.s(a3 + 1, 2, "0");
case "MMM":
return h3(n3.monthsShort, a3, c4, 3);
case "MMMM":
return h3(c4, a3);
case "D":
return e4.$D;
case "DD":
return b2.s(e4.$D, 2, "0");
case "d":
return String(e4.$W);
case "dd":
return h3(n3.weekdaysMin, e4.$W, o3, 2);
case "ddd":
return h3(n3.weekdaysShort, e4.$W, o3, 3);
case "dddd":
return o3[e4.$W];
case "H":
return String(s3);
case "HH":
return b2.s(s3, 2, "0");
case "h":
return d3(1);
case "hh":
return d3(2);
case "a":
return $4(s3, u3, true);
case "A":
return $4(s3, u3, false);
case "m":
return String(u3);
case "mm":
return b2.s(u3, 2, "0");
case "s":
return String(e4.$s);
case "ss":
return b2.s(e4.$s, 2, "0");
case "SSS":
return b2.s(e4.$ms, 3, "0");
case "Z":
return i3;
}
return null;
}(t6) || i3.replace(":", "");
});
}, m3.utcOffset = function() {
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
}, m3.diff = function(r3, d3, l3) {
var $4, y6 = this, M4 = b2.p(d3), m4 = O2(r3), v4 = (m4.utcOffset() - this.utcOffset()) * e3, g3 = this - m4, D4 = /* @__PURE__ */ __name(function() {
return b2.m(y6, m4);
}, "D");
switch (M4) {
case h2:
$4 = D4() / 12;
break;
case c3:
$4 = D4();
break;
case f2:
$4 = D4() / 3;
break;
case o2:
$4 = (g3 - v4) / 6048e5;
break;
case a2:
$4 = (g3 - v4) / 864e5;
break;
case u2:
$4 = g3 / n2;
break;
case s2:
$4 = g3 / e3;
break;
case i2:
$4 = g3 / t4;
break;
default:
$4 = g3;
}
return l3 ? $4 : b2.a($4);
}, m3.daysInMonth = function() {
return this.endOf(c3).$D;
}, m3.$locale = function() {
return D3[this.$L];
}, m3.locale = function(t5, e4) {
if (!t5) return this.$L;
var n3 = this.clone(), r3 = w3(t5, e4, true);
return r3 && (n3.$L = r3), n3;
}, m3.clone = function() {
return b2.w(this.$d, this);
}, m3.toDate = function() {
return new Date(this.valueOf());
}, m3.toJSON = function() {
return this.isValid() ? this.toISOString() : null;
}, m3.toISOString = function() {
return this.$d.toISOString();
}, m3.toString = function() {
return this.$d.toUTCString();
}, M3;
}(), k2 = _2.prototype;
return O2.prototype = k2, [["$ms", r2], ["$s", i2], ["$m", s2], ["$H", u2], ["$W", a2], ["$M", c3], ["$y", h2], ["$D", d2]].forEach(function(t5) {
k2[t5[1]] = function(e4) {
return this.$g(e4, t5[0], t5[1]);
};
}), O2.extend = function(t5, e4) {
return t5.$i || (t5(e4, _2, O2), t5.$i = true), O2;
}, O2.locale = w3, O2.isDayjs = S3, O2.unix = function(t5) {
return O2(1e3 * t5);
}, O2.en = D3[g2], O2.Ls = D3, O2.p = {}, O2;
});
}
});
// src/logger.ts
var import_dayjs, LEVELS, log, setLogLevel, format;
var init_logger = __esm({
"src/logger.ts"() {
"use strict";
import_dayjs = __toESM(require_dayjs_min(), 1);
LEVELS = {
trace: 0,
debug: 1,
info: 2,
warn: 3,
error: 4,
fatal: 5
};
log = {
trace: /* @__PURE__ */ __name((..._args) => {
}, "trace"),
debug: /* @__PURE__ */ __name((..._args) => {
}, "debug"),
info: /* @__PURE__ */ __name((..._args) => {
}, "info"),
warn: /* @__PURE__ */ __name((..._args) => {
}, "warn"),
error: /* @__PURE__ */ __name((..._args) => {
}, "error"),
fatal: /* @__PURE__ */ __name((..._args) => {
}, "fatal")
};
setLogLevel = /* @__PURE__ */ __name(function(level = "fatal") {
let numericLevel = LEVELS.fatal;
if (typeof level === "string") {
if (level.toLowerCase() in LEVELS) {
numericLevel = LEVELS[level];
}
} else if (typeof level === "number") {
numericLevel = level;
}
log.trace = () => {
};
log.debug = () => {
};
log.info = () => {
};
log.warn = () => {
};
log.error = () => {
};
log.fatal = () => {
};
if (numericLevel <= LEVELS.fatal) {
log.fatal = console.error ? console.error.bind(console, format("FATAL"), "color: orange") : console.log.bind(console, "\x1B[35m", format("FATAL"));
}
if (numericLevel <= LEVELS.error) {
log.error = console.error ? console.error.bind(console, format("ERROR"), "color: orange") : console.log.bind(console, "\x1B[31m", format("ERROR"));
}
if (numericLevel <= LEVELS.warn) {
log.warn = console.warn ? console.warn.bind(console, format("WARN"), "color: orange") : console.log.bind(console, `\x1B[33m`, format("WARN"));
}
if (numericLevel <= LEVELS.info) {
log.info = console.info ? console.info.bind(console, format("INFO"), "color: lightblue") : console.log.bind(console, "\x1B[34m", format("INFO"));
}
if (numericLevel <= LEVELS.debug) {
log.debug = console.debug ? console.debug.bind(console, format("DEBUG"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", format("DEBUG"));
}
if (numericLevel <= LEVELS.trace) {
log.trace = console.debug ? console.debug.bind(console, format("TRACE"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", format("TRACE"));
}
}, "setLogLevel");
format = /* @__PURE__ */ __name((level) => {
const time4 = (0, import_dayjs.default)().format("ss.SSS");
return `%c${time4} : ${level} : `;
}, "format");
}
});
// ../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/icon/defaults.mjs
var defaultIconDimensions, defaultIconTransformations, defaultIconProps, defaultExtendedIconProps;
var init_defaults = __esm({
"../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/icon/defaults.mjs"() {
"use strict";
defaultIconDimensions = Object.freeze(
{
left: 0,
top: 0,
width: 16,
height: 16
}
);
defaultIconTransformations = Object.freeze({
rotate: 0,
vFlip: false,
hFlip: false
});
defaultIconProps = Object.freeze({
...defaultIconDimensions,
...defaultIconTransformations
});
defaultExtendedIconProps = Object.freeze({
...defaultIconProps,
body: "",
hidden: false
});
}
});
// ../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/customisations/defaults.mjs
var defaultIconSizeCustomisations, defaultIconCustomisations;
var init_defaults2 = __esm({
"../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/customisations/defaults.mjs"() {
"use strict";
init_defaults();
defaultIconSizeCustomisations = Object.freeze({
width: null,
height: null
});
defaultIconCustomisations = Object.freeze({
// Dimensions
...defaultIconSizeCustomisations,
// Transformations
...defaultIconTransformations
});
}
});
// ../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/icon/name.mjs
var stringToIcon, validateIconName;
var init_name = __esm({
"../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/icon/name.mjs"() {
"use strict";
stringToIcon = /* @__PURE__ */ __name((value2, validate, allowSimpleName, provider = "") => {
const colonSeparated = value2.split(":");
if (value2.slice(0, 1) === "@") {
if (colonSeparated.length < 2 || colonSeparated.length > 3) {
return null;
}
provider = colonSeparated.shift().slice(1);
}
if (colonSeparated.length > 3 || !colonSeparated.length) {
return null;
}
if (colonSeparated.length > 1) {
const name2 = colonSeparated.pop();
const prefix = colonSeparated.pop();
const result = {
// Allow provider without '@': "provider:prefix:name"
provider: colonSeparated.length > 0 ? colonSeparated[0] : provider,
prefix,
name: name2
};
return validate && !validateIconName(result) ? null : result;
}
const name = colonSeparated[0];
const dashSeparated = name.split("-");
if (dashSeparated.length > 1) {
const result = {
provider,
prefix: dashSeparated.shift(),
name: dashSeparated.join("-")
};
return validate && !validateIconName(result) ? null : result;
}
if (allowSimpleName && provider === "") {
const result = {
provider,
prefix: "",
name
};
return validate && !validateIconName(result, allowSimpleName) ? null : result;
}
return null;
}, "stringToIcon");
validateIconName = /* @__PURE__ */ __name((icon2, allowSimpleName) => {
if (!icon2) {
return false;
}
return !!// Check prefix: cannot be empty, unless allowSimpleName is enabled
// Check name: cannot be empty
((allowSimpleName && icon2.prefix === "" || !!icon2.prefix) && !!icon2.name);
}, "validateIconName");
}
});
// ../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/icon/transformations.mjs
function mergeIconTransformations(obj1, obj2) {
const result = {};
if (!obj1.hFlip !== !obj2.hFlip) {
result.hFlip = true;
}
if (!obj1.vFlip !== !obj2.vFlip) {
result.vFlip = true;
}
const rotate2 = ((obj1.rotate || 0) + (obj2.rotate || 0)) % 4;
if (rotate2) {
result.rotate = rotate2;
}
return result;
}
var init_transformations = __esm({
"../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/icon/transformations.mjs"() {
"use strict";
__name(mergeIconTransformations, "mergeIconTransformations");
}
});
// ../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/icon/merge.mjs
function mergeIconData(parent4, child) {
const result = mergeIconTransformations(parent4, child);
for (const key in defaultExtendedIconProps) {
if (key in defaultIconTransformations) {
if (key in parent4 && !(key in result)) {
result[key] = defaultIconTransformations[key];
}
} else if (key in child) {
result[key] = child[key];
} else if (key in parent4) {
result[key] = parent4[key];
}
}
return result;
}
var init_merge = __esm({
"../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/icon/merge.mjs"() {
"use strict";
init_defaults();
init_transformations();
__name(mergeIconData, "mergeIconData");
}
});
// ../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/icon-set/tree.mjs
function getIconsTree(data6, names) {
const icons = data6.icons;
const aliases = data6.aliases || /* @__PURE__ */ Object.create(null);
const resolved = /* @__PURE__ */ Object.create(null);
function resolve3(name) {
if (icons[name]) {
return resolved[name] = [];
}
if (!(name in resolved)) {
resolved[name] = null;
const parent4 = aliases[name] && aliases[name].parent;
const value2 = parent4 && resolve3(parent4);
if (value2) {
resolved[name] = [parent4].concat(value2);
}
}
return resolved[name];
}
__name(resolve3, "resolve");
(names || Object.keys(icons).concat(Object.keys(aliases))).forEach(resolve3);
return resolved;
}
var init_tree = __esm({
"../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/icon-set/tree.mjs"() {
"use strict";
__name(getIconsTree, "getIconsTree");
}
});
// ../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/icon-set/get-icon.mjs
function internalGetIconData(data6, name, tree) {
const icons = data6.icons;
const aliases = data6.aliases || /* @__PURE__ */ Object.create(null);
let currentProps = {};
function parse7(name2) {
currentProps = mergeIconData(
icons[name2] || aliases[name2],
currentProps
);
}
__name(parse7, "parse");
parse7(name);
tree.forEach(parse7);
return mergeIconData(data6, currentProps);
}
function getIconData(data6, name) {
if (data6.icons[name]) {
return internalGetIconData(data6, name, []);
}
const tree = getIconsTree(data6, [name])[name];
return tree ? internalGetIconData(data6, name, tree) : null;
}
var init_get_icon = __esm({
"../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/icon-set/get-icon.mjs"() {
"use strict";
init_merge();
init_tree();
__name(internalGetIconData, "internalGetIconData");
__name(getIconData, "getIconData");
}
});
// ../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/svg/size.mjs
function calculateSize(size5, ratio, precision) {
if (ratio === 1) {
return size5;
}
precision = precision || 100;
if (typeof size5 === "number") {
return Math.ceil(size5 * ratio * precision) / precision;
}
if (typeof size5 !== "string") {
return size5;
}
const oldParts = size5.split(unitsSplit);
if (oldParts === null || !oldParts.length) {
return size5;
}
const newParts = [];
let code = oldParts.shift();
let isNumber = unitsTest.test(code);
while (true) {
if (isNumber) {
const num = parseFloat(code);
if (isNaN(num)) {
newParts.push(code);
} else {
newParts.push(Math.ceil(num * ratio * precision) / precision);
}
} else {
newParts.push(code);
}
code = oldParts.shift();
if (code === void 0) {
return newParts.join("");
}
isNumber = !isNumber;
}
}
var unitsSplit, unitsTest;
var init_size = __esm({
"../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/svg/size.mjs"() {
"use strict";
unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;
unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
__name(calculateSize, "calculateSize");
}
});
// ../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/svg/defs.mjs
function splitSVGDefs(content, tag2 = "defs") {
let defs2 = "";
const index = content.indexOf("<" + tag2);
while (index >= 0) {
const start3 = content.indexOf(">", index);
const end2 = content.indexOf("</" + tag2);
if (start3 === -1 || end2 === -1) {
break;
}
const endEnd = content.indexOf(">", end2);
if (endEnd === -1) {
break;
}
defs2 += content.slice(start3 + 1, end2).trim();
content = content.slice(0, index).trim() + content.slice(endEnd + 1);
}
return {
defs: defs2,
content
};
}
function mergeDefsAndContent(defs2, content) {
return defs2 ? "<defs>" + defs2 + "</defs>" + content : content;
}
function wrapSVGContent(body, start3, end2) {
const split = splitSVGDefs(body);
return mergeDefsAndContent(split.defs, start3 + split.content + end2);
}
var init_defs = __esm({
"../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/svg/defs.mjs"() {
"use strict";
__name(splitSVGDefs, "splitSVGDefs");
__name(mergeDefsAndContent, "mergeDefsAndContent");
__name(wrapSVGContent, "wrapSVGContent");
}
});
// ../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/svg/build.mjs
function iconToSVG(icon2, customisations) {
const fullIcon = {
...defaultIconProps,
...icon2
};
const fullCustomisations = {
...defaultIconCustomisations,
...customisations
};
const box = {
left: fullIcon.left,
top: fullIcon.top,
width: fullIcon.width,
height: fullIcon.height
};
let body = fullIcon.body;
[fullIcon, fullCustomisations].forEach((props) => {
const transformations = [];
const hFlip = props.hFlip;
const vFlip = props.vFlip;
let rotation = props.rotate;
if (hFlip) {
if (vFlip) {
rotation += 2;
} else {
transformations.push(
"translate(" + (box.width + box.left).toString() + " " + (0 - box.top).toString() + ")"
);
transformations.push("scale(-1 1)");
box.top = box.left = 0;
}
} else if (vFlip) {
transformations.push(
"translate(" + (0 - box.left).toString() + " " + (box.height + box.top).toString() + ")"
);
transformations.push("scale(1 -1)");
box.top = box.left = 0;
}
let tempValue;
if (rotation < 0) {
rotation -= Math.floor(rotation / 4) * 4;
}
rotation = rotation % 4;
switch (rotation) {
case 1:
tempValue = box.height / 2 + box.top;
transformations.unshift(
"rotate(90 " + tempValue.toString() + " " + tempValue.toString() + ")"
);
break;
case 2:
transformations.unshift(
"rotate(180 " + (box.width / 2 + box.left).toString() + " " + (box.height / 2 + box.top).toString() + ")"
);
break;
case 3:
tempValue = box.width / 2 + box.left;
transformations.unshift(
"rotate(-90 " + tempValue.toString() + " " + tempValue.toString() + ")"
);
break;
}
if (rotation % 2 === 1) {
if (box.left !== box.top) {
tempValue = box.left;
box.left = box.top;
box.top = tempValue;
}
if (box.width !== box.height) {
tempValue = box.width;
box.width = box.height;
box.height = tempValue;
}
}
if (transformations.length) {
body = wrapSVGContent(
body,
'<g transform="' + transformations.join(" ") + '">',
"</g>"
);
}
});
const customisationsWidth = fullCustomisations.width;
const customisationsHeight = fullCustomisations.height;
const boxWidth = box.width;
const boxHeight = box.height;
let width3;
let height2;
if (customisationsWidth === null) {
height2 = customisationsHeight === null ? "1em" : customisationsHeight === "auto" ? boxHeight : customisationsHeight;
width3 = calculateSize(height2, boxWidth / boxHeight);
} else {
width3 = customisationsWidth === "auto" ? boxWidth : customisationsWidth;
height2 = customisationsHeight === null ? calculateSize(width3, boxHeight / boxWidth) : customisationsHeight === "auto" ? boxHeight : customisationsHeight;
}
const attributes = {};
const setAttr = /* @__PURE__ */ __name((prop, value2) => {
if (!isUnsetKeyword(value2)) {
attributes[prop] = value2.toString();
}
}, "setAttr");
setAttr("width", width3);
setAttr("height", height2);
const viewBox = [box.left, box.top, boxWidth, boxHeight];
attributes.viewBox = viewBox.join(" ");
return {
attributes,
viewBox,
body
};
}
var isUnsetKeyword;
var init_build = __esm({
"../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/svg/build.mjs"() {
"use strict";
init_defaults();
init_defaults2();
init_size();
init_defs();
isUnsetKeyword = /* @__PURE__ */ __name((value2) => value2 === "unset" || value2 === "undefined" || value2 === "none", "isUnsetKeyword");
__name(iconToSVG, "iconToSVG");
}
});
// ../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/svg/id.mjs
function replaceIDs(body, prefix = randomPrefix) {
const ids = [];
let match2;
while (match2 = regex.exec(body)) {
ids.push(match2[1]);
}
if (!ids.length) {
return body;
}
const suffix = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
ids.forEach((id29) => {
const newID = typeof prefix === "function" ? prefix(id29) : prefix + (counter++).toString();
const escapedID = id29.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
body = body.replace(
// Allowed characters before id: [#;"]
// Allowed characters after id: [)"], .[a-z]
new RegExp('([#;"])(' + escapedID + ')([")]|\\.[a-z])', "g"),
"$1" + newID + suffix + "$3"
);
});
body = body.replace(new RegExp(suffix, "g"), "");
return body;
}
var regex, randomPrefix, counter;
var init_id = __esm({
"../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/svg/id.mjs"() {
"use strict";
regex = /\sid="(\S+)"/g;
randomPrefix = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
counter = 0;
__name(replaceIDs, "replaceIDs");
}
});
// ../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/svg/html.mjs
function iconToHTML(body, attributes) {
let renderAttribsHTML = body.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
for (const attr in attributes) {
renderAttribsHTML += " " + attr + '="' + attributes[attr] + '"';
}
return '<svg xmlns="http://www.w3.org/2000/svg"' + renderAttribsHTML + ">" + body + "</svg>";
}
var init_html = __esm({
"../../node_modules/.pnpm/@iconify+utils@2.3.0/node_modules/@iconify/utils/lib/svg/html.mjs"() {
"use strict";
__name(iconToHTML, "iconToHTML");
}
});
// ../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
var require_ms = __commonJS({
"../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports2, module2) {
"use strict";
var s2 = 1e3;
var m2 = s2 * 60;
var h2 = m2 * 60;
var d2 = h2 * 24;
var w3 = d2 * 7;
var y5 = d2 * 365.25;
module2.exports = function(val, options3) {
options3 = options3 || {};
var type3 = typeof val;
if (type3 === "string" && val.length > 0) {
return parse7(val);
} else if (type3 === "number" && isFinite(val)) {
return options3.long ? fmtLong(val) : fmtShort(val);
}
throw new Error(
"val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
);
};
function parse7(str2) {
str2 = String(str2);
if (str2.length > 100) {
return;
}
var match2 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
str2
);
if (!match2) {
return;
}
var n2 = parseFloat(match2[1]);
var type3 = (match2[2] || "ms").toLowerCase();
switch (type3) {
case "years":
case "year":
case "yrs":
case "yr":
case "y":
return n2 * y5;
case "weeks":
case "week":
case "w":
return n2 * w3;
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 * m2;
case "seconds":
case "second":
case "secs":
case "sec":
case "s":
return n2 * s2;
case "milliseconds":
case "millisecond":
case "msecs":
case "msec":
case "ms":
return n2;
default:
return void 0;
}
}
__name(parse7, "parse");
function fmtShort(ms3) {
var msAbs = Math.abs(ms3);
if (msAbs >= d2) {
return Math.round(ms3 / d2) + "d";
}
if (msAbs >= h2) {
return Math.round(ms3 / h2) + "h";
}
if (msAbs >= m2) {
return Math.round(ms3 / m2) + "m";
}
if (msAbs >= s2) {
return Math.round(ms3 / s2) + "s";
}
return ms3 + "ms";
}
__name(fmtShort, "fmtShort");
function fmtLong(ms3) {
var msAbs = Math.abs(ms3);
if (msAbs >= d2) {
return plural(ms3, msAbs, d2, "day");
}
if (msAbs >= h2) {
return plural(ms3, msAbs, h2, "hour");
}
if (msAbs >= m2) {
return plural(ms3, msAbs, m2, "minute");
}
if (msAbs >= s2) {
return plural(ms3, msAbs, s2, "second");
}
return ms3 + " ms";
}
__name(fmtLong, "fmtLong");
function plural(ms3, msAbs, n2, name) {
var isPlural = msAbs >= n2 * 1.5;
return Math.round(ms3 / n2) + " " + name + (isPlural ? "s" : "");
}
__name(plural, "plural");
}
});
// ../../node_modules/.pnpm/debug@4.4.0_supports-color@8.1.1/node_modules/debug/src/common.js
var require_common = __commonJS({
"../../node_modules/.pnpm/debug@4.4.0_supports-color@8.1.1/node_modules/debug/src/common.js"(exports2, module2) {
"use strict";
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 = destroy2;
Object.keys(env).forEach((key) => {
createDebug[key] = env[key];
});
createDebug.names = [];
createDebug.skips = [];
createDebug.formatters = {};
function selectColor(namespace) {
let hash = 0;
for (let i2 = 0; i2 < namespace.length; i2++) {
hash = (hash << 5) - hash + namespace.charCodeAt(i2);
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 debug(...args) {
if (!debug.enabled) {
return;
}
const self2 = debug;
const curr = Number(/* @__PURE__ */ new Date());
const ms3 = curr - (prevTime || curr);
self2.diff = ms3;
self2.prev = prevTime;
self2.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, (match2, format3) => {
if (match2 === "%%") {
return "%";
}
index++;
const formatter = createDebug.formatters[format3];
if (typeof formatter === "function") {
const val = args[index];
match2 = formatter.call(self2, val);
args.splice(index, 1);
index--;
}
return match2;
});
createDebug.formatArgs.call(self2, args);
const logFn = self2.log || createDebug.log;
logFn.apply(self2, args);
}
__name(debug, "debug");
debug.namespace = namespace;
debug.useColors = createDebug.useColors();
debug.color = createDebug.selectColor(namespace);
debug.extend = extend5;
debug.destroy = createDebug.destroy;
Object.defineProperty(debug, "enabled", {
enumerable: true,
configurable: false,
get: /* @__PURE__ */ __name(() => {
if (enableOverride !== null) {
return enableOverride;
}
if (namespacesCache !== createDebug.namespaces) {
namespacesCache = createDebug.namespaces;
enabledCache = createDebug.enabled(namespace);
}
return enabledCache;
}, "get"),
set: /* @__PURE__ */ __name((v3) => {
enableOverride = v3;
}, "set")
});
if (typeof createDebug.init === "function") {
createDebug.init(debug);
}
return debug;
}
__name(createDebug, "createDebug");
function extend5(namespace, delimiter3) {
const newDebug = createDebug(this.namespace + (typeof delimiter3 === "undefined" ? ":" : delimiter3) + namespace);
newDebug.log = this.log;
return newDebug;
}
__name(extend5, "extend");
function enable(namespaces) {
createDebug.save(namespaces);
createDebug.namespaces = namespaces;
createDebug.names = [];
createDebug.skips = [];
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(" ", ",").split(",").filter(Boolean);
for (const ns of split) {
if (ns[0] === "-") {
createDebug.skips.push(ns.slice(1));
} else {
createDebug.names.push(ns);
}
}
}
__name(enable, "enable");
function matchesTemplate(search, template) {
let searchIndex = 0;
let templateIndex = 0;
let starIndex = -1;
let matchIndex = 0;
while (searchIndex < search.length) {
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
if (template[templateIndex] === "*") {
starIndex = templateIndex;
matchIndex = searchIndex;
templateIndex++;
} else {
searchIndex++;
templateIndex++;
}
} else if (starIndex !== -1) {
templateIndex = starIndex + 1;
matchIndex++;
searchIndex = matchIndex;
} else {
return false;
}
}
while (templateIndex < template.length && template[templateIndex] === "*") {
templateIndex++;
}
return templateIndex === template.length;
}
__name(matchesTemplate, "matchesTemplate");
function disable() {
const namespaces = [
...createDebug.names,
...createDebug.skips.map((namespace) => "-" + namespace)
].join(",");
createDebug.enable("");
return namespaces;
}
__name(disable, "disable");
function enabled(name) {
for (const skip of createDebug.skips) {
if (matchesTemplate(name, skip)) {
return false;
}
}
for (const ns of createDebug.names) {
if (matchesTemplate(name, ns)) {
return true;
}
}
return false;
}
__name(enabled, "enabled");
function coerce(val) {
if (val instanceof Error) {
return val.stack || val.message;
}
return val;
}
__name(coerce, "coerce");
function destroy2() {
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(destroy2, "destroy");
createDebug.enable(createDebug.load());
return createDebug;
}
__name(setup, "setup");
module2.exports = setup;
}
});
// ../../node_modules/.pnpm/debug@4.4.0_supports-color@8.1.1/node_modules/debug/src/browser.js
var require_browser = __commonJS({
"../../node_modules/.pnpm/debug@4.4.0_supports-color@8.1.1/node_modules/debug/src/browser.js"(exports2, module2) {
"use strict";
exports2.formatArgs = formatArgs;
exports2.save = save;
exports2.load = load2;
exports2.useColors = useColors;
exports2.storage = localstorage();
exports2.destroy = /* @__PURE__ */ (() => {
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`.");
}
};
})();
exports2.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;
}
let m2;
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
typeof navigator !== "undefined" && navigator.userAgent && (m2 = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m2[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
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 c3 = "color: " + this.color;
args.splice(1, 0, c3, "color: inherit");
let index = 0;
let lastC = 0;
args[0].replace(/%[a-zA-Z%]/g, (match2) => {
if (match2 === "%%") {
return;
}
index++;
if (match2 === "%c") {
lastC = index;
}
});
args.splice(lastC, 0, c3);
}
__name(formatArgs, "formatArgs");
exports2.log = console.debug || console.log || (() => {
});
function save(namespaces) {
try {
if (namespaces) {
exports2.storage.setItem("debug", namespaces);
} else