@teams-max/mwsp 1.0.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/mwsp.js +0 -29
- package/es/cli/build.d.ts +0 -1
- package/es/cli/build.js +69 -61
- package/es/cli/cli.js +4 -12
- package/es/cli/start.d.ts +0 -1
- package/es/cli/start.js +48 -26
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/utils/chalk/LICENSE +9 -0
- package/es/utils/chalk/index.d.ts +416 -0
- package/es/utils/chalk/index.js +1719 -0
- package/es/utils/chalk/package.json +1 -0
- package/es/{cli/update.js → utils/changelog.js} +41 -34
- package/es/{internal → utils}/datetimeFormat.js +1 -3
- package/es/utils/defineConfig.js +20 -0
- package/es/{internal → utils}/exec.js +3 -2
- package/es/utils/getPackages.js +9 -0
- package/es/{cli/dev.js → utils/git.js} +88 -36
- package/es/{internal/buildNotify.js → utils/index.js} +220 -97
- package/es/utils/isNextVersion.js +3 -0
- package/es/utils/parseDoc.js +33 -0
- package/es/utils/yargs-parser/index.d.ts +112 -0
- package/es/utils/yargs-parser/index.js +919 -0
- package/es/utils/yargs-parser/package.json +1 -0
- package/lib/cli/build.d.ts +0 -1
- package/lib/cli/build.js +54 -50
- package/lib/cli/cli.js +0 -8
- package/lib/cli/start.d.ts +0 -1
- package/lib/cli/start.js +25 -30
- package/lib/index.d.ts +2 -0
- package/lib/index.js +3 -0
- package/lib/utils/chalk/LICENSE +9 -0
- package/lib/utils/chalk/index.d.ts +416 -0
- package/lib/utils/chalk/index.js +1495 -0
- package/lib/utils/chalk/package.json +1 -0
- package/lib/utils/changelog.js +21 -0
- package/lib/{internal → utils}/cross-spawn/index.js +1 -1
- package/lib/{internal → utils}/datetimeFormat.js +10 -29
- package/lib/utils/defineConfig.js +19 -0
- package/lib/utils/exec.js +23 -0
- package/lib/{internal → utils}/execa/index.js +1 -1
- package/lib/utils/getPackages.js +6 -0
- package/lib/utils/git.js +23 -0
- package/lib/utils/index.js +159 -0
- package/lib/utils/isNextVersion.js +4 -0
- package/lib/{internal → utils}/merge-stream/index.js +1 -1
- package/lib/utils/parseDoc.js +30 -0
- package/lib/utils/yargs-parser/index.d.ts +112 -0
- package/lib/utils/yargs-parser/index.js +905 -0
- package/lib/utils/yargs-parser/package.json +1 -0
- package/package.json +4 -11
- package/es/cli/dev.d.ts +0 -1
- package/es/cli/update.d.ts +0 -2
- package/es/internal/buildNotify.d.ts +0 -10
- package/es/internal/datetimeFormat.d.ts +0 -9
- package/es/internal/exec.d.ts +0 -1
- package/es/internal/utils.d.ts +0 -14
- package/es/internal/utils.js +0 -90
- package/lib/cli/dev.d.ts +0 -1
- package/lib/cli/dev.js +0 -62
- package/lib/cli/update.d.ts +0 -2
- package/lib/cli/update.js +0 -50
- package/lib/internal/buildNotify.d.ts +0 -10
- package/lib/internal/buildNotify.js +0 -112
- package/lib/internal/datetimeFormat.d.ts +0 -9
- package/lib/internal/exec.d.ts +0 -1
- package/lib/internal/exec.js +0 -60
- package/lib/internal/utils.d.ts +0 -14
- package/lib/internal/utils.js +0 -100
- /package/es/{internal → utils}/cross-spawn/LICENSE +0 -0
- /package/es/{internal → utils}/cross-spawn/index.d.ts +0 -0
- /package/es/{internal → utils}/cross-spawn/index.js +0 -0
- /package/es/{internal → utils}/cross-spawn/package.json +0 -0
- /package/es/{internal → utils}/execa/LICENSE +0 -0
- /package/es/{internal → utils}/execa/index.d.ts +0 -0
- /package/es/{internal → utils}/execa/index.js +0 -0
- /package/es/{internal → utils}/execa/package.json +0 -0
- /package/es/{internal → utils}/merge-stream/LICENSE +0 -0
- /package/es/{internal → utils}/merge-stream/index.d.ts +0 -0
- /package/es/{internal → utils}/merge-stream/index.js +0 -0
- /package/es/{internal → utils}/merge-stream/package.json +0 -0
- /package/lib/{internal → utils}/cross-spawn/LICENSE +0 -0
- /package/lib/{internal → utils}/cross-spawn/index.d.ts +0 -0
- /package/lib/{internal → utils}/cross-spawn/package.json +0 -0
- /package/lib/{internal → utils}/execa/LICENSE +0 -0
- /package/lib/{internal → utils}/execa/index.d.ts +0 -0
- /package/lib/{internal → utils}/execa/package.json +0 -0
- /package/lib/{internal → utils}/merge-stream/LICENSE +0 -0
- /package/lib/{internal → utils}/merge-stream/index.d.ts +0 -0
- /package/lib/{internal → utils}/merge-stream/package.json +0 -0
|
@@ -0,0 +1,1495 @@
|
|
|
1
|
+
// src/utils/chalk/index.js
|
|
2
|
+
module.exports = (() => {
|
|
3
|
+
var e = {
|
|
4
|
+
68: (e2, t2, n) => {
|
|
5
|
+
"use strict";
|
|
6
|
+
e2 = n.nmd(e2);
|
|
7
|
+
const r = (e3, t3) => (...n2) => {
|
|
8
|
+
const r2 = e3(...n2);
|
|
9
|
+
return `\x1B[${r2 + t3}m`;
|
|
10
|
+
};
|
|
11
|
+
const o = (e3, t3) => (...n2) => {
|
|
12
|
+
const r2 = e3(...n2);
|
|
13
|
+
return `\x1B[${38 + t3};5;${r2}m`;
|
|
14
|
+
};
|
|
15
|
+
const s = (e3, t3) => (...n2) => {
|
|
16
|
+
const r2 = e3(...n2);
|
|
17
|
+
return `\x1B[${38 + t3};2;${r2[0]};${r2[1]};${r2[2]}m`;
|
|
18
|
+
};
|
|
19
|
+
const l = (e3) => e3;
|
|
20
|
+
const c = (e3, t3, n2) => [e3, t3, n2];
|
|
21
|
+
const i = (e3, t3, n2) => {
|
|
22
|
+
Object.defineProperty(e3, t3, {
|
|
23
|
+
get: () => {
|
|
24
|
+
const r2 = n2();
|
|
25
|
+
Object.defineProperty(e3, t3, { value: r2, enumerable: true, configurable: true });
|
|
26
|
+
return r2;
|
|
27
|
+
},
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
let a;
|
|
33
|
+
const u = (e3, t3, r2, o2) => {
|
|
34
|
+
if (a === void 0) {
|
|
35
|
+
a = n(53);
|
|
36
|
+
}
|
|
37
|
+
const s2 = o2 ? 10 : 0;
|
|
38
|
+
const l2 = {};
|
|
39
|
+
for (const [n2, o3] of Object.entries(a)) {
|
|
40
|
+
const c2 = n2 === "ansi16" ? "ansi" : n2;
|
|
41
|
+
if (n2 === t3) {
|
|
42
|
+
l2[c2] = e3(r2, s2);
|
|
43
|
+
} else if (typeof o3 === "object") {
|
|
44
|
+
l2[c2] = e3(o3[t3], s2);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return l2;
|
|
48
|
+
};
|
|
49
|
+
function assembleStyles() {
|
|
50
|
+
const e3 = /* @__PURE__ */ new Map();
|
|
51
|
+
const t3 = {
|
|
52
|
+
modifier: {
|
|
53
|
+
reset: [0, 0],
|
|
54
|
+
bold: [1, 22],
|
|
55
|
+
dim: [2, 22],
|
|
56
|
+
italic: [3, 23],
|
|
57
|
+
underline: [4, 24],
|
|
58
|
+
inverse: [7, 27],
|
|
59
|
+
hidden: [8, 28],
|
|
60
|
+
strikethrough: [9, 29]
|
|
61
|
+
},
|
|
62
|
+
color: {
|
|
63
|
+
black: [30, 39],
|
|
64
|
+
red: [31, 39],
|
|
65
|
+
green: [32, 39],
|
|
66
|
+
yellow: [33, 39],
|
|
67
|
+
blue: [34, 39],
|
|
68
|
+
magenta: [35, 39],
|
|
69
|
+
cyan: [36, 39],
|
|
70
|
+
white: [37, 39],
|
|
71
|
+
blackBright: [90, 39],
|
|
72
|
+
redBright: [91, 39],
|
|
73
|
+
greenBright: [92, 39],
|
|
74
|
+
yellowBright: [93, 39],
|
|
75
|
+
blueBright: [94, 39],
|
|
76
|
+
magentaBright: [95, 39],
|
|
77
|
+
cyanBright: [96, 39],
|
|
78
|
+
whiteBright: [97, 39]
|
|
79
|
+
},
|
|
80
|
+
bgColor: {
|
|
81
|
+
bgBlack: [40, 49],
|
|
82
|
+
bgRed: [41, 49],
|
|
83
|
+
bgGreen: [42, 49],
|
|
84
|
+
bgYellow: [43, 49],
|
|
85
|
+
bgBlue: [44, 49],
|
|
86
|
+
bgMagenta: [45, 49],
|
|
87
|
+
bgCyan: [46, 49],
|
|
88
|
+
bgWhite: [47, 49],
|
|
89
|
+
bgBlackBright: [100, 49],
|
|
90
|
+
bgRedBright: [101, 49],
|
|
91
|
+
bgGreenBright: [102, 49],
|
|
92
|
+
bgYellowBright: [103, 49],
|
|
93
|
+
bgBlueBright: [104, 49],
|
|
94
|
+
bgMagentaBright: [105, 49],
|
|
95
|
+
bgCyanBright: [106, 49],
|
|
96
|
+
bgWhiteBright: [107, 49]
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
t3.color.gray = t3.color.blackBright;
|
|
100
|
+
t3.bgColor.bgGray = t3.bgColor.bgBlackBright;
|
|
101
|
+
t3.color.grey = t3.color.blackBright;
|
|
102
|
+
t3.bgColor.bgGrey = t3.bgColor.bgBlackBright;
|
|
103
|
+
for (const [n2, r2] of Object.entries(t3)) {
|
|
104
|
+
for (const [n3, o2] of Object.entries(r2)) {
|
|
105
|
+
t3[n3] = { open: `\x1B[${o2[0]}m`, close: `\x1B[${o2[1]}m` };
|
|
106
|
+
r2[n3] = t3[n3];
|
|
107
|
+
e3.set(o2[0], o2[1]);
|
|
108
|
+
}
|
|
109
|
+
Object.defineProperty(t3, n2, { value: r2, enumerable: false });
|
|
110
|
+
}
|
|
111
|
+
Object.defineProperty(t3, "codes", { value: e3, enumerable: false });
|
|
112
|
+
t3.color.close = "\x1B[39m";
|
|
113
|
+
t3.bgColor.close = "\x1B[49m";
|
|
114
|
+
i(t3.color, "ansi", () => u(r, "ansi16", l, false));
|
|
115
|
+
i(t3.color, "ansi256", () => u(o, "ansi256", l, false));
|
|
116
|
+
i(t3.color, "ansi16m", () => u(s, "rgb", c, false));
|
|
117
|
+
i(t3.bgColor, "ansi", () => u(r, "ansi16", l, true));
|
|
118
|
+
i(t3.bgColor, "ansi256", () => u(o, "ansi256", l, true));
|
|
119
|
+
i(t3.bgColor, "ansi16m", () => u(s, "rgb", c, true));
|
|
120
|
+
return t3;
|
|
121
|
+
}
|
|
122
|
+
Object.defineProperty(e2, "exports", { enumerable: true, get: assembleStyles });
|
|
123
|
+
},
|
|
124
|
+
294: (e2, t2, n) => {
|
|
125
|
+
const r = n(510);
|
|
126
|
+
const o = {};
|
|
127
|
+
for (const e3 of Object.keys(r)) {
|
|
128
|
+
o[r[e3]] = e3;
|
|
129
|
+
}
|
|
130
|
+
const s = {
|
|
131
|
+
rgb: { channels: 3, labels: "rgb" },
|
|
132
|
+
hsl: { channels: 3, labels: "hsl" },
|
|
133
|
+
hsv: { channels: 3, labels: "hsv" },
|
|
134
|
+
hwb: { channels: 3, labels: "hwb" },
|
|
135
|
+
cmyk: { channels: 4, labels: "cmyk" },
|
|
136
|
+
xyz: { channels: 3, labels: "xyz" },
|
|
137
|
+
lab: { channels: 3, labels: "lab" },
|
|
138
|
+
lch: { channels: 3, labels: "lch" },
|
|
139
|
+
hex: { channels: 1, labels: ["hex"] },
|
|
140
|
+
keyword: { channels: 1, labels: ["keyword"] },
|
|
141
|
+
ansi16: { channels: 1, labels: ["ansi16"] },
|
|
142
|
+
ansi256: { channels: 1, labels: ["ansi256"] },
|
|
143
|
+
hcg: { channels: 3, labels: ["h", "c", "g"] },
|
|
144
|
+
apple: { channels: 3, labels: ["r16", "g16", "b16"] },
|
|
145
|
+
gray: { channels: 1, labels: ["gray"] }
|
|
146
|
+
};
|
|
147
|
+
e2.exports = s;
|
|
148
|
+
for (const e3 of Object.keys(s)) {
|
|
149
|
+
if (!("channels" in s[e3])) {
|
|
150
|
+
throw new Error("missing channels property: " + e3);
|
|
151
|
+
}
|
|
152
|
+
if (!("labels" in s[e3])) {
|
|
153
|
+
throw new Error("missing channel labels property: " + e3);
|
|
154
|
+
}
|
|
155
|
+
if (s[e3].labels.length !== s[e3].channels) {
|
|
156
|
+
throw new Error("channel and label counts mismatch: " + e3);
|
|
157
|
+
}
|
|
158
|
+
const { channels: t3, labels: n2 } = s[e3];
|
|
159
|
+
delete s[e3].channels;
|
|
160
|
+
delete s[e3].labels;
|
|
161
|
+
Object.defineProperty(s[e3], "channels", { value: t3 });
|
|
162
|
+
Object.defineProperty(s[e3], "labels", { value: n2 });
|
|
163
|
+
}
|
|
164
|
+
s.rgb.hsl = function(e3) {
|
|
165
|
+
const t3 = e3[0] / 255;
|
|
166
|
+
const n2 = e3[1] / 255;
|
|
167
|
+
const r2 = e3[2] / 255;
|
|
168
|
+
const o2 = Math.min(t3, n2, r2);
|
|
169
|
+
const s2 = Math.max(t3, n2, r2);
|
|
170
|
+
const l = s2 - o2;
|
|
171
|
+
let c;
|
|
172
|
+
let i;
|
|
173
|
+
if (s2 === o2) {
|
|
174
|
+
c = 0;
|
|
175
|
+
} else if (t3 === s2) {
|
|
176
|
+
c = (n2 - r2) / l;
|
|
177
|
+
} else if (n2 === s2) {
|
|
178
|
+
c = 2 + (r2 - t3) / l;
|
|
179
|
+
} else if (r2 === s2) {
|
|
180
|
+
c = 4 + (t3 - n2) / l;
|
|
181
|
+
}
|
|
182
|
+
c = Math.min(c * 60, 360);
|
|
183
|
+
if (c < 0) {
|
|
184
|
+
c += 360;
|
|
185
|
+
}
|
|
186
|
+
const a = (o2 + s2) / 2;
|
|
187
|
+
if (s2 === o2) {
|
|
188
|
+
i = 0;
|
|
189
|
+
} else if (a <= 0.5) {
|
|
190
|
+
i = l / (s2 + o2);
|
|
191
|
+
} else {
|
|
192
|
+
i = l / (2 - s2 - o2);
|
|
193
|
+
}
|
|
194
|
+
return [c, i * 100, a * 100];
|
|
195
|
+
};
|
|
196
|
+
s.rgb.hsv = function(e3) {
|
|
197
|
+
let t3;
|
|
198
|
+
let n2;
|
|
199
|
+
let r2;
|
|
200
|
+
let o2;
|
|
201
|
+
let s2;
|
|
202
|
+
const l = e3[0] / 255;
|
|
203
|
+
const c = e3[1] / 255;
|
|
204
|
+
const i = e3[2] / 255;
|
|
205
|
+
const a = Math.max(l, c, i);
|
|
206
|
+
const u = a - Math.min(l, c, i);
|
|
207
|
+
const f = function(e4) {
|
|
208
|
+
return (a - e4) / 6 / u + 1 / 2;
|
|
209
|
+
};
|
|
210
|
+
if (u === 0) {
|
|
211
|
+
o2 = 0;
|
|
212
|
+
s2 = 0;
|
|
213
|
+
} else {
|
|
214
|
+
s2 = u / a;
|
|
215
|
+
t3 = f(l);
|
|
216
|
+
n2 = f(c);
|
|
217
|
+
r2 = f(i);
|
|
218
|
+
if (l === a) {
|
|
219
|
+
o2 = r2 - n2;
|
|
220
|
+
} else if (c === a) {
|
|
221
|
+
o2 = 1 / 3 + t3 - r2;
|
|
222
|
+
} else if (i === a) {
|
|
223
|
+
o2 = 2 / 3 + n2 - t3;
|
|
224
|
+
}
|
|
225
|
+
if (o2 < 0) {
|
|
226
|
+
o2 += 1;
|
|
227
|
+
} else if (o2 > 1) {
|
|
228
|
+
o2 -= 1;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return [o2 * 360, s2 * 100, a * 100];
|
|
232
|
+
};
|
|
233
|
+
s.rgb.hwb = function(e3) {
|
|
234
|
+
const t3 = e3[0];
|
|
235
|
+
const n2 = e3[1];
|
|
236
|
+
let r2 = e3[2];
|
|
237
|
+
const o2 = s.rgb.hsl(e3)[0];
|
|
238
|
+
const l = 1 / 255 * Math.min(t3, Math.min(n2, r2));
|
|
239
|
+
r2 = 1 - 1 / 255 * Math.max(t3, Math.max(n2, r2));
|
|
240
|
+
return [o2, l * 100, r2 * 100];
|
|
241
|
+
};
|
|
242
|
+
s.rgb.cmyk = function(e3) {
|
|
243
|
+
const t3 = e3[0] / 255;
|
|
244
|
+
const n2 = e3[1] / 255;
|
|
245
|
+
const r2 = e3[2] / 255;
|
|
246
|
+
const o2 = Math.min(1 - t3, 1 - n2, 1 - r2);
|
|
247
|
+
const s2 = (1 - t3 - o2) / (1 - o2) || 0;
|
|
248
|
+
const l = (1 - n2 - o2) / (1 - o2) || 0;
|
|
249
|
+
const c = (1 - r2 - o2) / (1 - o2) || 0;
|
|
250
|
+
return [s2 * 100, l * 100, c * 100, o2 * 100];
|
|
251
|
+
};
|
|
252
|
+
function comparativeDistance(e3, t3) {
|
|
253
|
+
return (e3[0] - t3[0]) ** 2 + (e3[1] - t3[1]) ** 2 + (e3[2] - t3[2]) ** 2;
|
|
254
|
+
}
|
|
255
|
+
s.rgb.keyword = function(e3) {
|
|
256
|
+
const t3 = o[e3];
|
|
257
|
+
if (t3) {
|
|
258
|
+
return t3;
|
|
259
|
+
}
|
|
260
|
+
let n2 = Infinity;
|
|
261
|
+
let s2;
|
|
262
|
+
for (const t4 of Object.keys(r)) {
|
|
263
|
+
const o2 = r[t4];
|
|
264
|
+
const l = comparativeDistance(e3, o2);
|
|
265
|
+
if (l < n2) {
|
|
266
|
+
n2 = l;
|
|
267
|
+
s2 = t4;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return s2;
|
|
271
|
+
};
|
|
272
|
+
s.keyword.rgb = function(e3) {
|
|
273
|
+
return r[e3];
|
|
274
|
+
};
|
|
275
|
+
s.rgb.xyz = function(e3) {
|
|
276
|
+
let t3 = e3[0] / 255;
|
|
277
|
+
let n2 = e3[1] / 255;
|
|
278
|
+
let r2 = e3[2] / 255;
|
|
279
|
+
t3 = t3 > 0.04045 ? ((t3 + 0.055) / 1.055) ** 2.4 : t3 / 12.92;
|
|
280
|
+
n2 = n2 > 0.04045 ? ((n2 + 0.055) / 1.055) ** 2.4 : n2 / 12.92;
|
|
281
|
+
r2 = r2 > 0.04045 ? ((r2 + 0.055) / 1.055) ** 2.4 : r2 / 12.92;
|
|
282
|
+
const o2 = t3 * 0.4124 + n2 * 0.3576 + r2 * 0.1805;
|
|
283
|
+
const s2 = t3 * 0.2126 + n2 * 0.7152 + r2 * 0.0722;
|
|
284
|
+
const l = t3 * 0.0193 + n2 * 0.1192 + r2 * 0.9505;
|
|
285
|
+
return [o2 * 100, s2 * 100, l * 100];
|
|
286
|
+
};
|
|
287
|
+
s.rgb.lab = function(e3) {
|
|
288
|
+
const t3 = s.rgb.xyz(e3);
|
|
289
|
+
let n2 = t3[0];
|
|
290
|
+
let r2 = t3[1];
|
|
291
|
+
let o2 = t3[2];
|
|
292
|
+
n2 /= 95.047;
|
|
293
|
+
r2 /= 100;
|
|
294
|
+
o2 /= 108.883;
|
|
295
|
+
n2 = n2 > 8856e-6 ? n2 ** (1 / 3) : 7.787 * n2 + 16 / 116;
|
|
296
|
+
r2 = r2 > 8856e-6 ? r2 ** (1 / 3) : 7.787 * r2 + 16 / 116;
|
|
297
|
+
o2 = o2 > 8856e-6 ? o2 ** (1 / 3) : 7.787 * o2 + 16 / 116;
|
|
298
|
+
const l = 116 * r2 - 16;
|
|
299
|
+
const c = 500 * (n2 - r2);
|
|
300
|
+
const i = 200 * (r2 - o2);
|
|
301
|
+
return [l, c, i];
|
|
302
|
+
};
|
|
303
|
+
s.hsl.rgb = function(e3) {
|
|
304
|
+
const t3 = e3[0] / 360;
|
|
305
|
+
const n2 = e3[1] / 100;
|
|
306
|
+
const r2 = e3[2] / 100;
|
|
307
|
+
let o2;
|
|
308
|
+
let s2;
|
|
309
|
+
let l;
|
|
310
|
+
if (n2 === 0) {
|
|
311
|
+
l = r2 * 255;
|
|
312
|
+
return [l, l, l];
|
|
313
|
+
}
|
|
314
|
+
if (r2 < 0.5) {
|
|
315
|
+
o2 = r2 * (1 + n2);
|
|
316
|
+
} else {
|
|
317
|
+
o2 = r2 + n2 - r2 * n2;
|
|
318
|
+
}
|
|
319
|
+
const c = 2 * r2 - o2;
|
|
320
|
+
const i = [0, 0, 0];
|
|
321
|
+
for (let e4 = 0; e4 < 3; e4++) {
|
|
322
|
+
s2 = t3 + 1 / 3 * -(e4 - 1);
|
|
323
|
+
if (s2 < 0) {
|
|
324
|
+
s2++;
|
|
325
|
+
}
|
|
326
|
+
if (s2 > 1) {
|
|
327
|
+
s2--;
|
|
328
|
+
}
|
|
329
|
+
if (6 * s2 < 1) {
|
|
330
|
+
l = c + (o2 - c) * 6 * s2;
|
|
331
|
+
} else if (2 * s2 < 1) {
|
|
332
|
+
l = o2;
|
|
333
|
+
} else if (3 * s2 < 2) {
|
|
334
|
+
l = c + (o2 - c) * (2 / 3 - s2) * 6;
|
|
335
|
+
} else {
|
|
336
|
+
l = c;
|
|
337
|
+
}
|
|
338
|
+
i[e4] = l * 255;
|
|
339
|
+
}
|
|
340
|
+
return i;
|
|
341
|
+
};
|
|
342
|
+
s.hsl.hsv = function(e3) {
|
|
343
|
+
const t3 = e3[0];
|
|
344
|
+
let n2 = e3[1] / 100;
|
|
345
|
+
let r2 = e3[2] / 100;
|
|
346
|
+
let o2 = n2;
|
|
347
|
+
const s2 = Math.max(r2, 0.01);
|
|
348
|
+
r2 *= 2;
|
|
349
|
+
n2 *= r2 <= 1 ? r2 : 2 - r2;
|
|
350
|
+
o2 *= s2 <= 1 ? s2 : 2 - s2;
|
|
351
|
+
const l = (r2 + n2) / 2;
|
|
352
|
+
const c = r2 === 0 ? 2 * o2 / (s2 + o2) : 2 * n2 / (r2 + n2);
|
|
353
|
+
return [t3, c * 100, l * 100];
|
|
354
|
+
};
|
|
355
|
+
s.hsv.rgb = function(e3) {
|
|
356
|
+
const t3 = e3[0] / 60;
|
|
357
|
+
const n2 = e3[1] / 100;
|
|
358
|
+
let r2 = e3[2] / 100;
|
|
359
|
+
const o2 = Math.floor(t3) % 6;
|
|
360
|
+
const s2 = t3 - Math.floor(t3);
|
|
361
|
+
const l = 255 * r2 * (1 - n2);
|
|
362
|
+
const c = 255 * r2 * (1 - n2 * s2);
|
|
363
|
+
const i = 255 * r2 * (1 - n2 * (1 - s2));
|
|
364
|
+
r2 *= 255;
|
|
365
|
+
switch (o2) {
|
|
366
|
+
case 0:
|
|
367
|
+
return [r2, i, l];
|
|
368
|
+
case 1:
|
|
369
|
+
return [c, r2, l];
|
|
370
|
+
case 2:
|
|
371
|
+
return [l, r2, i];
|
|
372
|
+
case 3:
|
|
373
|
+
return [l, c, r2];
|
|
374
|
+
case 4:
|
|
375
|
+
return [i, l, r2];
|
|
376
|
+
case 5:
|
|
377
|
+
return [r2, l, c];
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
s.hsv.hsl = function(e3) {
|
|
381
|
+
const t3 = e3[0];
|
|
382
|
+
const n2 = e3[1] / 100;
|
|
383
|
+
const r2 = e3[2] / 100;
|
|
384
|
+
const o2 = Math.max(r2, 0.01);
|
|
385
|
+
let s2;
|
|
386
|
+
let l;
|
|
387
|
+
l = (2 - n2) * r2;
|
|
388
|
+
const c = (2 - n2) * o2;
|
|
389
|
+
s2 = n2 * o2;
|
|
390
|
+
s2 /= c <= 1 ? c : 2 - c;
|
|
391
|
+
s2 = s2 || 0;
|
|
392
|
+
l /= 2;
|
|
393
|
+
return [t3, s2 * 100, l * 100];
|
|
394
|
+
};
|
|
395
|
+
s.hwb.rgb = function(e3) {
|
|
396
|
+
const t3 = e3[0] / 360;
|
|
397
|
+
let n2 = e3[1] / 100;
|
|
398
|
+
let r2 = e3[2] / 100;
|
|
399
|
+
const o2 = n2 + r2;
|
|
400
|
+
let s2;
|
|
401
|
+
if (o2 > 1) {
|
|
402
|
+
n2 /= o2;
|
|
403
|
+
r2 /= o2;
|
|
404
|
+
}
|
|
405
|
+
const l = Math.floor(6 * t3);
|
|
406
|
+
const c = 1 - r2;
|
|
407
|
+
s2 = 6 * t3 - l;
|
|
408
|
+
if ((l & 1) !== 0) {
|
|
409
|
+
s2 = 1 - s2;
|
|
410
|
+
}
|
|
411
|
+
const i = n2 + s2 * (c - n2);
|
|
412
|
+
let a;
|
|
413
|
+
let u;
|
|
414
|
+
let f;
|
|
415
|
+
switch (l) {
|
|
416
|
+
default:
|
|
417
|
+
case 6:
|
|
418
|
+
case 0:
|
|
419
|
+
a = c;
|
|
420
|
+
u = i;
|
|
421
|
+
f = n2;
|
|
422
|
+
break;
|
|
423
|
+
case 1:
|
|
424
|
+
a = i;
|
|
425
|
+
u = c;
|
|
426
|
+
f = n2;
|
|
427
|
+
break;
|
|
428
|
+
case 2:
|
|
429
|
+
a = n2;
|
|
430
|
+
u = c;
|
|
431
|
+
f = i;
|
|
432
|
+
break;
|
|
433
|
+
case 3:
|
|
434
|
+
a = n2;
|
|
435
|
+
u = i;
|
|
436
|
+
f = c;
|
|
437
|
+
break;
|
|
438
|
+
case 4:
|
|
439
|
+
a = i;
|
|
440
|
+
u = n2;
|
|
441
|
+
f = c;
|
|
442
|
+
break;
|
|
443
|
+
case 5:
|
|
444
|
+
a = c;
|
|
445
|
+
u = n2;
|
|
446
|
+
f = i;
|
|
447
|
+
break;
|
|
448
|
+
}
|
|
449
|
+
return [a * 255, u * 255, f * 255];
|
|
450
|
+
};
|
|
451
|
+
s.cmyk.rgb = function(e3) {
|
|
452
|
+
const t3 = e3[0] / 100;
|
|
453
|
+
const n2 = e3[1] / 100;
|
|
454
|
+
const r2 = e3[2] / 100;
|
|
455
|
+
const o2 = e3[3] / 100;
|
|
456
|
+
const s2 = 1 - Math.min(1, t3 * (1 - o2) + o2);
|
|
457
|
+
const l = 1 - Math.min(1, n2 * (1 - o2) + o2);
|
|
458
|
+
const c = 1 - Math.min(1, r2 * (1 - o2) + o2);
|
|
459
|
+
return [s2 * 255, l * 255, c * 255];
|
|
460
|
+
};
|
|
461
|
+
s.xyz.rgb = function(e3) {
|
|
462
|
+
const t3 = e3[0] / 100;
|
|
463
|
+
const n2 = e3[1] / 100;
|
|
464
|
+
const r2 = e3[2] / 100;
|
|
465
|
+
let o2;
|
|
466
|
+
let s2;
|
|
467
|
+
let l;
|
|
468
|
+
o2 = t3 * 3.2406 + n2 * -1.5372 + r2 * -0.4986;
|
|
469
|
+
s2 = t3 * -0.9689 + n2 * 1.8758 + r2 * 0.0415;
|
|
470
|
+
l = t3 * 0.0557 + n2 * -0.204 + r2 * 1.057;
|
|
471
|
+
o2 = o2 > 31308e-7 ? 1.055 * o2 ** (1 / 2.4) - 0.055 : o2 * 12.92;
|
|
472
|
+
s2 = s2 > 31308e-7 ? 1.055 * s2 ** (1 / 2.4) - 0.055 : s2 * 12.92;
|
|
473
|
+
l = l > 31308e-7 ? 1.055 * l ** (1 / 2.4) - 0.055 : l * 12.92;
|
|
474
|
+
o2 = Math.min(Math.max(0, o2), 1);
|
|
475
|
+
s2 = Math.min(Math.max(0, s2), 1);
|
|
476
|
+
l = Math.min(Math.max(0, l), 1);
|
|
477
|
+
return [o2 * 255, s2 * 255, l * 255];
|
|
478
|
+
};
|
|
479
|
+
s.xyz.lab = function(e3) {
|
|
480
|
+
let t3 = e3[0];
|
|
481
|
+
let n2 = e3[1];
|
|
482
|
+
let r2 = e3[2];
|
|
483
|
+
t3 /= 95.047;
|
|
484
|
+
n2 /= 100;
|
|
485
|
+
r2 /= 108.883;
|
|
486
|
+
t3 = t3 > 8856e-6 ? t3 ** (1 / 3) : 7.787 * t3 + 16 / 116;
|
|
487
|
+
n2 = n2 > 8856e-6 ? n2 ** (1 / 3) : 7.787 * n2 + 16 / 116;
|
|
488
|
+
r2 = r2 > 8856e-6 ? r2 ** (1 / 3) : 7.787 * r2 + 16 / 116;
|
|
489
|
+
const o2 = 116 * n2 - 16;
|
|
490
|
+
const s2 = 500 * (t3 - n2);
|
|
491
|
+
const l = 200 * (n2 - r2);
|
|
492
|
+
return [o2, s2, l];
|
|
493
|
+
};
|
|
494
|
+
s.lab.xyz = function(e3) {
|
|
495
|
+
const t3 = e3[0];
|
|
496
|
+
const n2 = e3[1];
|
|
497
|
+
const r2 = e3[2];
|
|
498
|
+
let o2;
|
|
499
|
+
let s2;
|
|
500
|
+
let l;
|
|
501
|
+
s2 = (t3 + 16) / 116;
|
|
502
|
+
o2 = n2 / 500 + s2;
|
|
503
|
+
l = s2 - r2 / 200;
|
|
504
|
+
const c = s2 ** 3;
|
|
505
|
+
const i = o2 ** 3;
|
|
506
|
+
const a = l ** 3;
|
|
507
|
+
s2 = c > 8856e-6 ? c : (s2 - 16 / 116) / 7.787;
|
|
508
|
+
o2 = i > 8856e-6 ? i : (o2 - 16 / 116) / 7.787;
|
|
509
|
+
l = a > 8856e-6 ? a : (l - 16 / 116) / 7.787;
|
|
510
|
+
o2 *= 95.047;
|
|
511
|
+
s2 *= 100;
|
|
512
|
+
l *= 108.883;
|
|
513
|
+
return [o2, s2, l];
|
|
514
|
+
};
|
|
515
|
+
s.lab.lch = function(e3) {
|
|
516
|
+
const t3 = e3[0];
|
|
517
|
+
const n2 = e3[1];
|
|
518
|
+
const r2 = e3[2];
|
|
519
|
+
let o2;
|
|
520
|
+
const s2 = Math.atan2(r2, n2);
|
|
521
|
+
o2 = s2 * 360 / 2 / Math.PI;
|
|
522
|
+
if (o2 < 0) {
|
|
523
|
+
o2 += 360;
|
|
524
|
+
}
|
|
525
|
+
const l = Math.sqrt(n2 * n2 + r2 * r2);
|
|
526
|
+
return [t3, l, o2];
|
|
527
|
+
};
|
|
528
|
+
s.lch.lab = function(e3) {
|
|
529
|
+
const t3 = e3[0];
|
|
530
|
+
const n2 = e3[1];
|
|
531
|
+
const r2 = e3[2];
|
|
532
|
+
const o2 = r2 / 360 * 2 * Math.PI;
|
|
533
|
+
const s2 = n2 * Math.cos(o2);
|
|
534
|
+
const l = n2 * Math.sin(o2);
|
|
535
|
+
return [t3, s2, l];
|
|
536
|
+
};
|
|
537
|
+
s.rgb.ansi16 = function(e3, t3 = null) {
|
|
538
|
+
const [n2, r2, o2] = e3;
|
|
539
|
+
let l = t3 === null ? s.rgb.hsv(e3)[2] : t3;
|
|
540
|
+
l = Math.round(l / 50);
|
|
541
|
+
if (l === 0) {
|
|
542
|
+
return 30;
|
|
543
|
+
}
|
|
544
|
+
let c = 30 + (Math.round(o2 / 255) << 2 | Math.round(r2 / 255) << 1 | Math.round(n2 / 255));
|
|
545
|
+
if (l === 2) {
|
|
546
|
+
c += 60;
|
|
547
|
+
}
|
|
548
|
+
return c;
|
|
549
|
+
};
|
|
550
|
+
s.hsv.ansi16 = function(e3) {
|
|
551
|
+
return s.rgb.ansi16(s.hsv.rgb(e3), e3[2]);
|
|
552
|
+
};
|
|
553
|
+
s.rgb.ansi256 = function(e3) {
|
|
554
|
+
const t3 = e3[0];
|
|
555
|
+
const n2 = e3[1];
|
|
556
|
+
const r2 = e3[2];
|
|
557
|
+
if (t3 === n2 && n2 === r2) {
|
|
558
|
+
if (t3 < 8) {
|
|
559
|
+
return 16;
|
|
560
|
+
}
|
|
561
|
+
if (t3 > 248) {
|
|
562
|
+
return 231;
|
|
563
|
+
}
|
|
564
|
+
return Math.round((t3 - 8) / 247 * 24) + 232;
|
|
565
|
+
}
|
|
566
|
+
const o2 = 16 + 36 * Math.round(t3 / 255 * 5) + 6 * Math.round(n2 / 255 * 5) + Math.round(r2 / 255 * 5);
|
|
567
|
+
return o2;
|
|
568
|
+
};
|
|
569
|
+
s.ansi16.rgb = function(e3) {
|
|
570
|
+
let t3 = e3 % 10;
|
|
571
|
+
if (t3 === 0 || t3 === 7) {
|
|
572
|
+
if (e3 > 50) {
|
|
573
|
+
t3 += 3.5;
|
|
574
|
+
}
|
|
575
|
+
t3 = t3 / 10.5 * 255;
|
|
576
|
+
return [t3, t3, t3];
|
|
577
|
+
}
|
|
578
|
+
const n2 = (~~(e3 > 50) + 1) * 0.5;
|
|
579
|
+
const r2 = (t3 & 1) * n2 * 255;
|
|
580
|
+
const o2 = (t3 >> 1 & 1) * n2 * 255;
|
|
581
|
+
const s2 = (t3 >> 2 & 1) * n2 * 255;
|
|
582
|
+
return [r2, o2, s2];
|
|
583
|
+
};
|
|
584
|
+
s.ansi256.rgb = function(e3) {
|
|
585
|
+
if (e3 >= 232) {
|
|
586
|
+
const t4 = (e3 - 232) * 10 + 8;
|
|
587
|
+
return [t4, t4, t4];
|
|
588
|
+
}
|
|
589
|
+
e3 -= 16;
|
|
590
|
+
let t3;
|
|
591
|
+
const n2 = Math.floor(e3 / 36) / 5 * 255;
|
|
592
|
+
const r2 = Math.floor((t3 = e3 % 36) / 6) / 5 * 255;
|
|
593
|
+
const o2 = t3 % 6 / 5 * 255;
|
|
594
|
+
return [n2, r2, o2];
|
|
595
|
+
};
|
|
596
|
+
s.rgb.hex = function(e3) {
|
|
597
|
+
const t3 = ((Math.round(e3[0]) & 255) << 16) + ((Math.round(e3[1]) & 255) << 8) + (Math.round(e3[2]) & 255);
|
|
598
|
+
const n2 = t3.toString(16).toUpperCase();
|
|
599
|
+
return "000000".substring(n2.length) + n2;
|
|
600
|
+
};
|
|
601
|
+
s.hex.rgb = function(e3) {
|
|
602
|
+
const t3 = e3.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
|
603
|
+
if (!t3) {
|
|
604
|
+
return [0, 0, 0];
|
|
605
|
+
}
|
|
606
|
+
let n2 = t3[0];
|
|
607
|
+
if (t3[0].length === 3) {
|
|
608
|
+
n2 = n2.split("").map((e4) => {
|
|
609
|
+
return e4 + e4;
|
|
610
|
+
}).join("");
|
|
611
|
+
}
|
|
612
|
+
const r2 = parseInt(n2, 16);
|
|
613
|
+
const o2 = r2 >> 16 & 255;
|
|
614
|
+
const s2 = r2 >> 8 & 255;
|
|
615
|
+
const l = r2 & 255;
|
|
616
|
+
return [o2, s2, l];
|
|
617
|
+
};
|
|
618
|
+
s.rgb.hcg = function(e3) {
|
|
619
|
+
const t3 = e3[0] / 255;
|
|
620
|
+
const n2 = e3[1] / 255;
|
|
621
|
+
const r2 = e3[2] / 255;
|
|
622
|
+
const o2 = Math.max(Math.max(t3, n2), r2);
|
|
623
|
+
const s2 = Math.min(Math.min(t3, n2), r2);
|
|
624
|
+
const l = o2 - s2;
|
|
625
|
+
let c;
|
|
626
|
+
let i;
|
|
627
|
+
if (l < 1) {
|
|
628
|
+
c = s2 / (1 - l);
|
|
629
|
+
} else {
|
|
630
|
+
c = 0;
|
|
631
|
+
}
|
|
632
|
+
if (l <= 0) {
|
|
633
|
+
i = 0;
|
|
634
|
+
} else if (o2 === t3) {
|
|
635
|
+
i = (n2 - r2) / l % 6;
|
|
636
|
+
} else if (o2 === n2) {
|
|
637
|
+
i = 2 + (r2 - t3) / l;
|
|
638
|
+
} else {
|
|
639
|
+
i = 4 + (t3 - n2) / l;
|
|
640
|
+
}
|
|
641
|
+
i /= 6;
|
|
642
|
+
i %= 1;
|
|
643
|
+
return [i * 360, l * 100, c * 100];
|
|
644
|
+
};
|
|
645
|
+
s.hsl.hcg = function(e3) {
|
|
646
|
+
const t3 = e3[1] / 100;
|
|
647
|
+
const n2 = e3[2] / 100;
|
|
648
|
+
const r2 = n2 < 0.5 ? 2 * t3 * n2 : 2 * t3 * (1 - n2);
|
|
649
|
+
let o2 = 0;
|
|
650
|
+
if (r2 < 1) {
|
|
651
|
+
o2 = (n2 - 0.5 * r2) / (1 - r2);
|
|
652
|
+
}
|
|
653
|
+
return [e3[0], r2 * 100, o2 * 100];
|
|
654
|
+
};
|
|
655
|
+
s.hsv.hcg = function(e3) {
|
|
656
|
+
const t3 = e3[1] / 100;
|
|
657
|
+
const n2 = e3[2] / 100;
|
|
658
|
+
const r2 = t3 * n2;
|
|
659
|
+
let o2 = 0;
|
|
660
|
+
if (r2 < 1) {
|
|
661
|
+
o2 = (n2 - r2) / (1 - r2);
|
|
662
|
+
}
|
|
663
|
+
return [e3[0], r2 * 100, o2 * 100];
|
|
664
|
+
};
|
|
665
|
+
s.hcg.rgb = function(e3) {
|
|
666
|
+
const t3 = e3[0] / 360;
|
|
667
|
+
const n2 = e3[1] / 100;
|
|
668
|
+
const r2 = e3[2] / 100;
|
|
669
|
+
if (n2 === 0) {
|
|
670
|
+
return [r2 * 255, r2 * 255, r2 * 255];
|
|
671
|
+
}
|
|
672
|
+
const o2 = [0, 0, 0];
|
|
673
|
+
const s2 = t3 % 1 * 6;
|
|
674
|
+
const l = s2 % 1;
|
|
675
|
+
const c = 1 - l;
|
|
676
|
+
let i = 0;
|
|
677
|
+
switch (Math.floor(s2)) {
|
|
678
|
+
case 0:
|
|
679
|
+
o2[0] = 1;
|
|
680
|
+
o2[1] = l;
|
|
681
|
+
o2[2] = 0;
|
|
682
|
+
break;
|
|
683
|
+
case 1:
|
|
684
|
+
o2[0] = c;
|
|
685
|
+
o2[1] = 1;
|
|
686
|
+
o2[2] = 0;
|
|
687
|
+
break;
|
|
688
|
+
case 2:
|
|
689
|
+
o2[0] = 0;
|
|
690
|
+
o2[1] = 1;
|
|
691
|
+
o2[2] = l;
|
|
692
|
+
break;
|
|
693
|
+
case 3:
|
|
694
|
+
o2[0] = 0;
|
|
695
|
+
o2[1] = c;
|
|
696
|
+
o2[2] = 1;
|
|
697
|
+
break;
|
|
698
|
+
case 4:
|
|
699
|
+
o2[0] = l;
|
|
700
|
+
o2[1] = 0;
|
|
701
|
+
o2[2] = 1;
|
|
702
|
+
break;
|
|
703
|
+
default:
|
|
704
|
+
o2[0] = 1;
|
|
705
|
+
o2[1] = 0;
|
|
706
|
+
o2[2] = c;
|
|
707
|
+
}
|
|
708
|
+
i = (1 - n2) * r2;
|
|
709
|
+
return [(n2 * o2[0] + i) * 255, (n2 * o2[1] + i) * 255, (n2 * o2[2] + i) * 255];
|
|
710
|
+
};
|
|
711
|
+
s.hcg.hsv = function(e3) {
|
|
712
|
+
const t3 = e3[1] / 100;
|
|
713
|
+
const n2 = e3[2] / 100;
|
|
714
|
+
const r2 = t3 + n2 * (1 - t3);
|
|
715
|
+
let o2 = 0;
|
|
716
|
+
if (r2 > 0) {
|
|
717
|
+
o2 = t3 / r2;
|
|
718
|
+
}
|
|
719
|
+
return [e3[0], o2 * 100, r2 * 100];
|
|
720
|
+
};
|
|
721
|
+
s.hcg.hsl = function(e3) {
|
|
722
|
+
const t3 = e3[1] / 100;
|
|
723
|
+
const n2 = e3[2] / 100;
|
|
724
|
+
const r2 = n2 * (1 - t3) + 0.5 * t3;
|
|
725
|
+
let o2 = 0;
|
|
726
|
+
if (r2 > 0 && r2 < 0.5) {
|
|
727
|
+
o2 = t3 / (2 * r2);
|
|
728
|
+
} else if (r2 >= 0.5 && r2 < 1) {
|
|
729
|
+
o2 = t3 / (2 * (1 - r2));
|
|
730
|
+
}
|
|
731
|
+
return [e3[0], o2 * 100, r2 * 100];
|
|
732
|
+
};
|
|
733
|
+
s.hcg.hwb = function(e3) {
|
|
734
|
+
const t3 = e3[1] / 100;
|
|
735
|
+
const n2 = e3[2] / 100;
|
|
736
|
+
const r2 = t3 + n2 * (1 - t3);
|
|
737
|
+
return [e3[0], (r2 - t3) * 100, (1 - r2) * 100];
|
|
738
|
+
};
|
|
739
|
+
s.hwb.hcg = function(e3) {
|
|
740
|
+
const t3 = e3[1] / 100;
|
|
741
|
+
const n2 = e3[2] / 100;
|
|
742
|
+
const r2 = 1 - n2;
|
|
743
|
+
const o2 = r2 - t3;
|
|
744
|
+
let s2 = 0;
|
|
745
|
+
if (o2 < 1) {
|
|
746
|
+
s2 = (r2 - o2) / (1 - o2);
|
|
747
|
+
}
|
|
748
|
+
return [e3[0], o2 * 100, s2 * 100];
|
|
749
|
+
};
|
|
750
|
+
s.apple.rgb = function(e3) {
|
|
751
|
+
return [e3[0] / 65535 * 255, e3[1] / 65535 * 255, e3[2] / 65535 * 255];
|
|
752
|
+
};
|
|
753
|
+
s.rgb.apple = function(e3) {
|
|
754
|
+
return [e3[0] / 255 * 65535, e3[1] / 255 * 65535, e3[2] / 255 * 65535];
|
|
755
|
+
};
|
|
756
|
+
s.gray.rgb = function(e3) {
|
|
757
|
+
return [e3[0] / 100 * 255, e3[0] / 100 * 255, e3[0] / 100 * 255];
|
|
758
|
+
};
|
|
759
|
+
s.gray.hsl = function(e3) {
|
|
760
|
+
return [0, 0, e3[0]];
|
|
761
|
+
};
|
|
762
|
+
s.gray.hsv = s.gray.hsl;
|
|
763
|
+
s.gray.hwb = function(e3) {
|
|
764
|
+
return [0, 100, e3[0]];
|
|
765
|
+
};
|
|
766
|
+
s.gray.cmyk = function(e3) {
|
|
767
|
+
return [0, 0, 0, e3[0]];
|
|
768
|
+
};
|
|
769
|
+
s.gray.lab = function(e3) {
|
|
770
|
+
return [e3[0], 0, 0];
|
|
771
|
+
};
|
|
772
|
+
s.gray.hex = function(e3) {
|
|
773
|
+
const t3 = Math.round(e3[0] / 100 * 255) & 255;
|
|
774
|
+
const n2 = (t3 << 16) + (t3 << 8) + t3;
|
|
775
|
+
const r2 = n2.toString(16).toUpperCase();
|
|
776
|
+
return "000000".substring(r2.length) + r2;
|
|
777
|
+
};
|
|
778
|
+
s.rgb.gray = function(e3) {
|
|
779
|
+
const t3 = (e3[0] + e3[1] + e3[2]) / 3;
|
|
780
|
+
return [t3 / 255 * 100];
|
|
781
|
+
};
|
|
782
|
+
},
|
|
783
|
+
53: (e2, t2, n) => {
|
|
784
|
+
const r = n(294);
|
|
785
|
+
const o = n(586);
|
|
786
|
+
const s = {};
|
|
787
|
+
const l = Object.keys(r);
|
|
788
|
+
function wrapRaw(e3) {
|
|
789
|
+
const t3 = function(...t4) {
|
|
790
|
+
const n2 = t4[0];
|
|
791
|
+
if (n2 === void 0 || n2 === null) {
|
|
792
|
+
return n2;
|
|
793
|
+
}
|
|
794
|
+
if (n2.length > 1) {
|
|
795
|
+
t4 = n2;
|
|
796
|
+
}
|
|
797
|
+
return e3(t4);
|
|
798
|
+
};
|
|
799
|
+
if ("conversion" in e3) {
|
|
800
|
+
t3.conversion = e3.conversion;
|
|
801
|
+
}
|
|
802
|
+
return t3;
|
|
803
|
+
}
|
|
804
|
+
function wrapRounded(e3) {
|
|
805
|
+
const t3 = function(...t4) {
|
|
806
|
+
const n2 = t4[0];
|
|
807
|
+
if (n2 === void 0 || n2 === null) {
|
|
808
|
+
return n2;
|
|
809
|
+
}
|
|
810
|
+
if (n2.length > 1) {
|
|
811
|
+
t4 = n2;
|
|
812
|
+
}
|
|
813
|
+
const r2 = e3(t4);
|
|
814
|
+
if (typeof r2 === "object") {
|
|
815
|
+
for (let e4 = r2.length, t5 = 0; t5 < e4; t5++) {
|
|
816
|
+
r2[t5] = Math.round(r2[t5]);
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
return r2;
|
|
820
|
+
};
|
|
821
|
+
if ("conversion" in e3) {
|
|
822
|
+
t3.conversion = e3.conversion;
|
|
823
|
+
}
|
|
824
|
+
return t3;
|
|
825
|
+
}
|
|
826
|
+
l.forEach((e3) => {
|
|
827
|
+
s[e3] = {};
|
|
828
|
+
Object.defineProperty(s[e3], "channels", { value: r[e3].channels });
|
|
829
|
+
Object.defineProperty(s[e3], "labels", { value: r[e3].labels });
|
|
830
|
+
const t3 = o(e3);
|
|
831
|
+
const n2 = Object.keys(t3);
|
|
832
|
+
n2.forEach((n3) => {
|
|
833
|
+
const r2 = t3[n3];
|
|
834
|
+
s[e3][n3] = wrapRounded(r2);
|
|
835
|
+
s[e3][n3].raw = wrapRaw(r2);
|
|
836
|
+
});
|
|
837
|
+
});
|
|
838
|
+
e2.exports = s;
|
|
839
|
+
},
|
|
840
|
+
586: (e2, t2, n) => {
|
|
841
|
+
const r = n(294);
|
|
842
|
+
function buildGraph() {
|
|
843
|
+
const e3 = {};
|
|
844
|
+
const t3 = Object.keys(r);
|
|
845
|
+
for (let n2 = t3.length, r2 = 0; r2 < n2; r2++) {
|
|
846
|
+
e3[t3[r2]] = { distance: -1, parent: null };
|
|
847
|
+
}
|
|
848
|
+
return e3;
|
|
849
|
+
}
|
|
850
|
+
function deriveBFS(e3) {
|
|
851
|
+
const t3 = buildGraph();
|
|
852
|
+
const n2 = [e3];
|
|
853
|
+
t3[e3].distance = 0;
|
|
854
|
+
while (n2.length) {
|
|
855
|
+
const e4 = n2.pop();
|
|
856
|
+
const o = Object.keys(r[e4]);
|
|
857
|
+
for (let r2 = o.length, s = 0; s < r2; s++) {
|
|
858
|
+
const r3 = o[s];
|
|
859
|
+
const l = t3[r3];
|
|
860
|
+
if (l.distance === -1) {
|
|
861
|
+
l.distance = t3[e4].distance + 1;
|
|
862
|
+
l.parent = e4;
|
|
863
|
+
n2.unshift(r3);
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
return t3;
|
|
868
|
+
}
|
|
869
|
+
function link(e3, t3) {
|
|
870
|
+
return function(n2) {
|
|
871
|
+
return t3(e3(n2));
|
|
872
|
+
};
|
|
873
|
+
}
|
|
874
|
+
function wrapConversion(e3, t3) {
|
|
875
|
+
const n2 = [t3[e3].parent, e3];
|
|
876
|
+
let o = r[t3[e3].parent][e3];
|
|
877
|
+
let s = t3[e3].parent;
|
|
878
|
+
while (t3[s].parent) {
|
|
879
|
+
n2.unshift(t3[s].parent);
|
|
880
|
+
o = link(r[t3[s].parent][s], o);
|
|
881
|
+
s = t3[s].parent;
|
|
882
|
+
}
|
|
883
|
+
o.conversion = n2;
|
|
884
|
+
return o;
|
|
885
|
+
}
|
|
886
|
+
e2.exports = function(e3) {
|
|
887
|
+
const t3 = deriveBFS(e3);
|
|
888
|
+
const n2 = {};
|
|
889
|
+
const r2 = Object.keys(t3);
|
|
890
|
+
for (let e4 = r2.length, o = 0; o < e4; o++) {
|
|
891
|
+
const e5 = r2[o];
|
|
892
|
+
const s = t3[e5];
|
|
893
|
+
if (s.parent === null) {
|
|
894
|
+
continue;
|
|
895
|
+
}
|
|
896
|
+
n2[e5] = wrapConversion(e5, t3);
|
|
897
|
+
}
|
|
898
|
+
return n2;
|
|
899
|
+
};
|
|
900
|
+
},
|
|
901
|
+
538: (e2) => {
|
|
902
|
+
"use strict";
|
|
903
|
+
e2.exports = (e3, t2 = process.argv) => {
|
|
904
|
+
const n = e3.startsWith("-") ? "" : e3.length === 1 ? "-" : "--";
|
|
905
|
+
const r = t2.indexOf(n + e3);
|
|
906
|
+
const o = t2.indexOf("--");
|
|
907
|
+
return r !== -1 && (o === -1 || r < o);
|
|
908
|
+
};
|
|
909
|
+
},
|
|
910
|
+
955: (e2, t2, n) => {
|
|
911
|
+
"use strict";
|
|
912
|
+
const r = n(87);
|
|
913
|
+
const o = n(867);
|
|
914
|
+
const s = n(538);
|
|
915
|
+
const { env: l } = process;
|
|
916
|
+
let c;
|
|
917
|
+
if (s("no-color") || s("no-colors") || s("color=false") || s("color=never")) {
|
|
918
|
+
c = 0;
|
|
919
|
+
} else if (s("color") || s("colors") || s("color=true") || s("color=always")) {
|
|
920
|
+
c = 1;
|
|
921
|
+
}
|
|
922
|
+
if ("FORCE_COLOR" in l) {
|
|
923
|
+
if (l.FORCE_COLOR === "true") {
|
|
924
|
+
c = 1;
|
|
925
|
+
} else if (l.FORCE_COLOR === "false") {
|
|
926
|
+
c = 0;
|
|
927
|
+
} else {
|
|
928
|
+
c = l.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(l.FORCE_COLOR, 10), 3);
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
function translateLevel(e3) {
|
|
932
|
+
if (e3 === 0) {
|
|
933
|
+
return false;
|
|
934
|
+
}
|
|
935
|
+
return { level: e3, hasBasic: true, has256: e3 >= 2, has16m: e3 >= 3 };
|
|
936
|
+
}
|
|
937
|
+
function supportsColor(e3, t3) {
|
|
938
|
+
if (c === 0) {
|
|
939
|
+
return 0;
|
|
940
|
+
}
|
|
941
|
+
if (s("color=16m") || s("color=full") || s("color=truecolor")) {
|
|
942
|
+
return 3;
|
|
943
|
+
}
|
|
944
|
+
if (s("color=256")) {
|
|
945
|
+
return 2;
|
|
946
|
+
}
|
|
947
|
+
if (e3 && !t3 && c === void 0) {
|
|
948
|
+
return 0;
|
|
949
|
+
}
|
|
950
|
+
const n2 = c || 0;
|
|
951
|
+
if (l.TERM === "dumb") {
|
|
952
|
+
return n2;
|
|
953
|
+
}
|
|
954
|
+
if (process.platform === "win32") {
|
|
955
|
+
const e4 = r.release().split(".");
|
|
956
|
+
if (Number(e4[0]) >= 10 && Number(e4[2]) >= 10586) {
|
|
957
|
+
return Number(e4[2]) >= 14931 ? 3 : 2;
|
|
958
|
+
}
|
|
959
|
+
return 1;
|
|
960
|
+
}
|
|
961
|
+
if ("CI" in l) {
|
|
962
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some(
|
|
963
|
+
(e4) => e4 in l
|
|
964
|
+
) || l.CI_NAME === "codeship") {
|
|
965
|
+
return 1;
|
|
966
|
+
}
|
|
967
|
+
return n2;
|
|
968
|
+
}
|
|
969
|
+
if ("TEAMCITY_VERSION" in l) {
|
|
970
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(l.TEAMCITY_VERSION) ? 1 : 0;
|
|
971
|
+
}
|
|
972
|
+
if (l.COLORTERM === "truecolor") {
|
|
973
|
+
return 3;
|
|
974
|
+
}
|
|
975
|
+
if ("TERM_PROGRAM" in l) {
|
|
976
|
+
const e4 = parseInt((l.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
977
|
+
switch (l.TERM_PROGRAM) {
|
|
978
|
+
case "iTerm.app":
|
|
979
|
+
return e4 >= 3 ? 3 : 2;
|
|
980
|
+
case "Apple_Terminal":
|
|
981
|
+
return 2;
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
if (/-256(color)?$/i.test(l.TERM)) {
|
|
985
|
+
return 2;
|
|
986
|
+
}
|
|
987
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(l.TERM)) {
|
|
988
|
+
return 1;
|
|
989
|
+
}
|
|
990
|
+
if ("COLORTERM" in l) {
|
|
991
|
+
return 1;
|
|
992
|
+
}
|
|
993
|
+
return n2;
|
|
994
|
+
}
|
|
995
|
+
function getSupportLevel(e3) {
|
|
996
|
+
const t3 = supportsColor(e3, e3 && e3.isTTY);
|
|
997
|
+
return translateLevel(t3);
|
|
998
|
+
}
|
|
999
|
+
e2.exports = {
|
|
1000
|
+
supportsColor: getSupportLevel,
|
|
1001
|
+
stdout: translateLevel(supportsColor(true, o.isatty(1))),
|
|
1002
|
+
stderr: translateLevel(supportsColor(true, o.isatty(2)))
|
|
1003
|
+
};
|
|
1004
|
+
},
|
|
1005
|
+
818: (e2, t2, n) => {
|
|
1006
|
+
"use strict";
|
|
1007
|
+
const r = n(68);
|
|
1008
|
+
const { stdout: o, stderr: s } = n(955);
|
|
1009
|
+
const { stringReplaceAll: l, stringEncaseCRLFWithFirstIndex: c } = n(415);
|
|
1010
|
+
const { isArray: i } = Array;
|
|
1011
|
+
const a = ["ansi", "ansi", "ansi256", "ansi16m"];
|
|
1012
|
+
const u = /* @__PURE__ */ Object.create(null);
|
|
1013
|
+
const f = (e3, t3 = {}) => {
|
|
1014
|
+
if (t3.level && !(Number.isInteger(t3.level) && t3.level >= 0 && t3.level <= 3)) {
|
|
1015
|
+
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
1016
|
+
}
|
|
1017
|
+
const n2 = o ? o.level : 0;
|
|
1018
|
+
e3.level = t3.level === void 0 ? n2 : t3.level;
|
|
1019
|
+
};
|
|
1020
|
+
class ChalkClass {
|
|
1021
|
+
constructor(e3) {
|
|
1022
|
+
return h(e3);
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
const h = (e3) => {
|
|
1026
|
+
const t3 = {};
|
|
1027
|
+
f(t3, e3);
|
|
1028
|
+
t3.template = (...e4) => w(t3.template, ...e4);
|
|
1029
|
+
Object.setPrototypeOf(t3, Chalk.prototype);
|
|
1030
|
+
Object.setPrototypeOf(t3.template, t3);
|
|
1031
|
+
t3.template.constructor = () => {
|
|
1032
|
+
throw new Error(
|
|
1033
|
+
"`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead."
|
|
1034
|
+
);
|
|
1035
|
+
};
|
|
1036
|
+
t3.template.Instance = ChalkClass;
|
|
1037
|
+
return t3.template;
|
|
1038
|
+
};
|
|
1039
|
+
function Chalk(e3) {
|
|
1040
|
+
return h(e3);
|
|
1041
|
+
}
|
|
1042
|
+
for (const [e3, t3] of Object.entries(r)) {
|
|
1043
|
+
u[e3] = {
|
|
1044
|
+
get() {
|
|
1045
|
+
const n2 = d(this, p(t3.open, t3.close, this._styler), this._isEmpty);
|
|
1046
|
+
Object.defineProperty(this, e3, { value: n2 });
|
|
1047
|
+
return n2;
|
|
1048
|
+
}
|
|
1049
|
+
};
|
|
1050
|
+
}
|
|
1051
|
+
u.visible = {
|
|
1052
|
+
get() {
|
|
1053
|
+
const e3 = d(this, this._styler, true);
|
|
1054
|
+
Object.defineProperty(this, "visible", { value: e3 });
|
|
1055
|
+
return e3;
|
|
1056
|
+
}
|
|
1057
|
+
};
|
|
1058
|
+
const g = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
|
|
1059
|
+
for (const e3 of g) {
|
|
1060
|
+
u[e3] = {
|
|
1061
|
+
get() {
|
|
1062
|
+
const { level: t3 } = this;
|
|
1063
|
+
return function(...n2) {
|
|
1064
|
+
const o2 = p(r.color[a[t3]][e3](...n2), r.color.close, this._styler);
|
|
1065
|
+
return d(this, o2, this._isEmpty);
|
|
1066
|
+
};
|
|
1067
|
+
}
|
|
1068
|
+
};
|
|
1069
|
+
}
|
|
1070
|
+
for (const e3 of g) {
|
|
1071
|
+
const t3 = "bg" + e3[0].toUpperCase() + e3.slice(1);
|
|
1072
|
+
u[t3] = {
|
|
1073
|
+
get() {
|
|
1074
|
+
const { level: t4 } = this;
|
|
1075
|
+
return function(...n2) {
|
|
1076
|
+
const o2 = p(r.bgColor[a[t4]][e3](...n2), r.bgColor.close, this._styler);
|
|
1077
|
+
return d(this, o2, this._isEmpty);
|
|
1078
|
+
};
|
|
1079
|
+
}
|
|
1080
|
+
};
|
|
1081
|
+
}
|
|
1082
|
+
const b = Object.defineProperties(() => {
|
|
1083
|
+
}, {
|
|
1084
|
+
...u,
|
|
1085
|
+
level: {
|
|
1086
|
+
enumerable: true,
|
|
1087
|
+
get() {
|
|
1088
|
+
return this._generator.level;
|
|
1089
|
+
},
|
|
1090
|
+
set(e3) {
|
|
1091
|
+
this._generator.level = e3;
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
});
|
|
1095
|
+
const p = (e3, t3, n2) => {
|
|
1096
|
+
let r2;
|
|
1097
|
+
let o2;
|
|
1098
|
+
if (n2 === void 0) {
|
|
1099
|
+
r2 = e3;
|
|
1100
|
+
o2 = t3;
|
|
1101
|
+
} else {
|
|
1102
|
+
r2 = n2.openAll + e3;
|
|
1103
|
+
o2 = t3 + n2.closeAll;
|
|
1104
|
+
}
|
|
1105
|
+
return { open: e3, close: t3, openAll: r2, closeAll: o2, parent: n2 };
|
|
1106
|
+
};
|
|
1107
|
+
const d = (e3, t3, n2) => {
|
|
1108
|
+
const r2 = (...e4) => {
|
|
1109
|
+
if (i(e4[0]) && i(e4[0].raw)) {
|
|
1110
|
+
return m(r2, w(r2, ...e4));
|
|
1111
|
+
}
|
|
1112
|
+
return m(r2, e4.length === 1 ? "" + e4[0] : e4.join(" "));
|
|
1113
|
+
};
|
|
1114
|
+
Object.setPrototypeOf(r2, b);
|
|
1115
|
+
r2._generator = e3;
|
|
1116
|
+
r2._styler = t3;
|
|
1117
|
+
r2._isEmpty = n2;
|
|
1118
|
+
return r2;
|
|
1119
|
+
};
|
|
1120
|
+
const m = (e3, t3) => {
|
|
1121
|
+
if (e3.level <= 0 || !t3) {
|
|
1122
|
+
return e3._isEmpty ? "" : t3;
|
|
1123
|
+
}
|
|
1124
|
+
let n2 = e3._styler;
|
|
1125
|
+
if (n2 === void 0) {
|
|
1126
|
+
return t3;
|
|
1127
|
+
}
|
|
1128
|
+
const { openAll: r2, closeAll: o2 } = n2;
|
|
1129
|
+
if (t3.indexOf("\x1B") !== -1) {
|
|
1130
|
+
while (n2 !== void 0) {
|
|
1131
|
+
t3 = l(t3, n2.close, n2.open);
|
|
1132
|
+
n2 = n2.parent;
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
const s2 = t3.indexOf("\n");
|
|
1136
|
+
if (s2 !== -1) {
|
|
1137
|
+
t3 = c(t3, o2, r2, s2);
|
|
1138
|
+
}
|
|
1139
|
+
return r2 + t3 + o2;
|
|
1140
|
+
};
|
|
1141
|
+
let y;
|
|
1142
|
+
const w = (e3, ...t3) => {
|
|
1143
|
+
const [r2] = t3;
|
|
1144
|
+
if (!i(r2) || !i(r2.raw)) {
|
|
1145
|
+
return t3.join(" ");
|
|
1146
|
+
}
|
|
1147
|
+
const o2 = t3.slice(1);
|
|
1148
|
+
const s2 = [r2.raw[0]];
|
|
1149
|
+
for (let e4 = 1; e4 < r2.length; e4++) {
|
|
1150
|
+
s2.push(String(o2[e4 - 1]).replace(/[{}\\]/g, "\\$&"), String(r2.raw[e4]));
|
|
1151
|
+
}
|
|
1152
|
+
if (y === void 0) {
|
|
1153
|
+
y = n(500);
|
|
1154
|
+
}
|
|
1155
|
+
return y(e3, s2.join(""));
|
|
1156
|
+
};
|
|
1157
|
+
Object.defineProperties(Chalk.prototype, u);
|
|
1158
|
+
const v = Chalk();
|
|
1159
|
+
v.supportsColor = o;
|
|
1160
|
+
v.stderr = Chalk({ level: s ? s.level : 0 });
|
|
1161
|
+
v.stderr.supportsColor = s;
|
|
1162
|
+
e2.exports = v;
|
|
1163
|
+
},
|
|
1164
|
+
500: (e2) => {
|
|
1165
|
+
"use strict";
|
|
1166
|
+
const t2 = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
|
1167
|
+
const n = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
|
1168
|
+
const r = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
|
1169
|
+
const o = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
|
|
1170
|
+
const s = /* @__PURE__ */ new Map([
|
|
1171
|
+
["n", "\n"],
|
|
1172
|
+
["r", "\r"],
|
|
1173
|
+
["t", " "],
|
|
1174
|
+
["b", "\b"],
|
|
1175
|
+
["f", "\f"],
|
|
1176
|
+
["v", "\v"],
|
|
1177
|
+
["0", "\0"],
|
|
1178
|
+
["\\", "\\"],
|
|
1179
|
+
["e", "\x1B"],
|
|
1180
|
+
["a", "\x07"]
|
|
1181
|
+
]);
|
|
1182
|
+
function unescape(e3) {
|
|
1183
|
+
const t3 = e3[0] === "u";
|
|
1184
|
+
const n2 = e3[1] === "{";
|
|
1185
|
+
if (t3 && !n2 && e3.length === 5 || e3[0] === "x" && e3.length === 3) {
|
|
1186
|
+
return String.fromCharCode(parseInt(e3.slice(1), 16));
|
|
1187
|
+
}
|
|
1188
|
+
if (t3 && n2) {
|
|
1189
|
+
return String.fromCodePoint(parseInt(e3.slice(2, -1), 16));
|
|
1190
|
+
}
|
|
1191
|
+
return s.get(e3) || e3;
|
|
1192
|
+
}
|
|
1193
|
+
function parseArguments(e3, t3) {
|
|
1194
|
+
const n2 = [];
|
|
1195
|
+
const s2 = t3.trim().split(/\s*,\s*/g);
|
|
1196
|
+
let l;
|
|
1197
|
+
for (const t4 of s2) {
|
|
1198
|
+
const s3 = Number(t4);
|
|
1199
|
+
if (!Number.isNaN(s3)) {
|
|
1200
|
+
n2.push(s3);
|
|
1201
|
+
} else if (l = t4.match(r)) {
|
|
1202
|
+
n2.push(l[2].replace(o, (e4, t5, n3) => t5 ? unescape(t5) : n3));
|
|
1203
|
+
} else {
|
|
1204
|
+
throw new Error(`Invalid Chalk template style argument: ${t4} (in style '${e3}')`);
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
return n2;
|
|
1208
|
+
}
|
|
1209
|
+
function parseStyle(e3) {
|
|
1210
|
+
n.lastIndex = 0;
|
|
1211
|
+
const t3 = [];
|
|
1212
|
+
let r2;
|
|
1213
|
+
while ((r2 = n.exec(e3)) !== null) {
|
|
1214
|
+
const e4 = r2[1];
|
|
1215
|
+
if (r2[2]) {
|
|
1216
|
+
const n2 = parseArguments(e4, r2[2]);
|
|
1217
|
+
t3.push([e4].concat(n2));
|
|
1218
|
+
} else {
|
|
1219
|
+
t3.push([e4]);
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
return t3;
|
|
1223
|
+
}
|
|
1224
|
+
function buildStyle(e3, t3) {
|
|
1225
|
+
const n2 = {};
|
|
1226
|
+
for (const e4 of t3) {
|
|
1227
|
+
for (const t4 of e4.styles) {
|
|
1228
|
+
n2[t4[0]] = e4.inverse ? null : t4.slice(1);
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
let r2 = e3;
|
|
1232
|
+
for (const [e4, t4] of Object.entries(n2)) {
|
|
1233
|
+
if (!Array.isArray(t4)) {
|
|
1234
|
+
continue;
|
|
1235
|
+
}
|
|
1236
|
+
if (!(e4 in r2)) {
|
|
1237
|
+
throw new Error(`Unknown Chalk style: ${e4}`);
|
|
1238
|
+
}
|
|
1239
|
+
r2 = t4.length > 0 ? r2[e4](...t4) : r2[e4];
|
|
1240
|
+
}
|
|
1241
|
+
return r2;
|
|
1242
|
+
}
|
|
1243
|
+
e2.exports = (e3, n2) => {
|
|
1244
|
+
const r2 = [];
|
|
1245
|
+
const o2 = [];
|
|
1246
|
+
let s2 = [];
|
|
1247
|
+
n2.replace(t2, (t3, n3, l, c, i, a) => {
|
|
1248
|
+
if (n3) {
|
|
1249
|
+
s2.push(unescape(n3));
|
|
1250
|
+
} else if (c) {
|
|
1251
|
+
const t4 = s2.join("");
|
|
1252
|
+
s2 = [];
|
|
1253
|
+
o2.push(r2.length === 0 ? t4 : buildStyle(e3, r2)(t4));
|
|
1254
|
+
r2.push({ inverse: l, styles: parseStyle(c) });
|
|
1255
|
+
} else if (i) {
|
|
1256
|
+
if (r2.length === 0) {
|
|
1257
|
+
throw new Error("Found extraneous } in Chalk template literal");
|
|
1258
|
+
}
|
|
1259
|
+
o2.push(buildStyle(e3, r2)(s2.join("")));
|
|
1260
|
+
s2 = [];
|
|
1261
|
+
r2.pop();
|
|
1262
|
+
} else {
|
|
1263
|
+
s2.push(a);
|
|
1264
|
+
}
|
|
1265
|
+
});
|
|
1266
|
+
o2.push(s2.join(""));
|
|
1267
|
+
if (r2.length > 0) {
|
|
1268
|
+
const e4 = `Chalk template literal is missing ${r2.length} closing bracket${r2.length === 1 ? "" : "s"} (\`}\`)`;
|
|
1269
|
+
throw new Error(e4);
|
|
1270
|
+
}
|
|
1271
|
+
return o2.join("");
|
|
1272
|
+
};
|
|
1273
|
+
},
|
|
1274
|
+
415: (e2) => {
|
|
1275
|
+
"use strict";
|
|
1276
|
+
const t2 = (e3, t3, n2) => {
|
|
1277
|
+
let r = e3.indexOf(t3);
|
|
1278
|
+
if (r === -1) {
|
|
1279
|
+
return e3;
|
|
1280
|
+
}
|
|
1281
|
+
const o = t3.length;
|
|
1282
|
+
let s = 0;
|
|
1283
|
+
let l = "";
|
|
1284
|
+
do {
|
|
1285
|
+
l += e3.substr(s, r - s) + t3 + n2;
|
|
1286
|
+
s = r + o;
|
|
1287
|
+
r = e3.indexOf(t3, s);
|
|
1288
|
+
} while (r !== -1);
|
|
1289
|
+
l += e3.substr(s);
|
|
1290
|
+
return l;
|
|
1291
|
+
};
|
|
1292
|
+
const n = (e3, t3, n2, r) => {
|
|
1293
|
+
let o = 0;
|
|
1294
|
+
let s = "";
|
|
1295
|
+
do {
|
|
1296
|
+
const l = e3[r - 1] === "\r";
|
|
1297
|
+
s += e3.substr(o, (l ? r - 1 : r) - o) + t3 + (l ? "\r\n" : "\n") + n2;
|
|
1298
|
+
o = r + 1;
|
|
1299
|
+
r = e3.indexOf("\n", o);
|
|
1300
|
+
} while (r !== -1);
|
|
1301
|
+
s += e3.substr(o);
|
|
1302
|
+
return s;
|
|
1303
|
+
};
|
|
1304
|
+
e2.exports = { stringReplaceAll: t2, stringEncaseCRLFWithFirstIndex: n };
|
|
1305
|
+
},
|
|
1306
|
+
510: (e2) => {
|
|
1307
|
+
"use strict";
|
|
1308
|
+
e2.exports = {
|
|
1309
|
+
aliceblue: [240, 248, 255],
|
|
1310
|
+
antiquewhite: [250, 235, 215],
|
|
1311
|
+
aqua: [0, 255, 255],
|
|
1312
|
+
aquamarine: [127, 255, 212],
|
|
1313
|
+
azure: [240, 255, 255],
|
|
1314
|
+
beige: [245, 245, 220],
|
|
1315
|
+
bisque: [255, 228, 196],
|
|
1316
|
+
black: [0, 0, 0],
|
|
1317
|
+
blanchedalmond: [255, 235, 205],
|
|
1318
|
+
blue: [0, 0, 255],
|
|
1319
|
+
blueviolet: [138, 43, 226],
|
|
1320
|
+
brown: [165, 42, 42],
|
|
1321
|
+
burlywood: [222, 184, 135],
|
|
1322
|
+
cadetblue: [95, 158, 160],
|
|
1323
|
+
chartreuse: [127, 255, 0],
|
|
1324
|
+
chocolate: [210, 105, 30],
|
|
1325
|
+
coral: [255, 127, 80],
|
|
1326
|
+
cornflowerblue: [100, 149, 237],
|
|
1327
|
+
cornsilk: [255, 248, 220],
|
|
1328
|
+
crimson: [220, 20, 60],
|
|
1329
|
+
cyan: [0, 255, 255],
|
|
1330
|
+
darkblue: [0, 0, 139],
|
|
1331
|
+
darkcyan: [0, 139, 139],
|
|
1332
|
+
darkgoldenrod: [184, 134, 11],
|
|
1333
|
+
darkgray: [169, 169, 169],
|
|
1334
|
+
darkgreen: [0, 100, 0],
|
|
1335
|
+
darkgrey: [169, 169, 169],
|
|
1336
|
+
darkkhaki: [189, 183, 107],
|
|
1337
|
+
darkmagenta: [139, 0, 139],
|
|
1338
|
+
darkolivegreen: [85, 107, 47],
|
|
1339
|
+
darkorange: [255, 140, 0],
|
|
1340
|
+
darkorchid: [153, 50, 204],
|
|
1341
|
+
darkred: [139, 0, 0],
|
|
1342
|
+
darksalmon: [233, 150, 122],
|
|
1343
|
+
darkseagreen: [143, 188, 143],
|
|
1344
|
+
darkslateblue: [72, 61, 139],
|
|
1345
|
+
darkslategray: [47, 79, 79],
|
|
1346
|
+
darkslategrey: [47, 79, 79],
|
|
1347
|
+
darkturquoise: [0, 206, 209],
|
|
1348
|
+
darkviolet: [148, 0, 211],
|
|
1349
|
+
deeppink: [255, 20, 147],
|
|
1350
|
+
deepskyblue: [0, 191, 255],
|
|
1351
|
+
dimgray: [105, 105, 105],
|
|
1352
|
+
dimgrey: [105, 105, 105],
|
|
1353
|
+
dodgerblue: [30, 144, 255],
|
|
1354
|
+
firebrick: [178, 34, 34],
|
|
1355
|
+
floralwhite: [255, 250, 240],
|
|
1356
|
+
forestgreen: [34, 139, 34],
|
|
1357
|
+
fuchsia: [255, 0, 255],
|
|
1358
|
+
gainsboro: [220, 220, 220],
|
|
1359
|
+
ghostwhite: [248, 248, 255],
|
|
1360
|
+
gold: [255, 215, 0],
|
|
1361
|
+
goldenrod: [218, 165, 32],
|
|
1362
|
+
gray: [128, 128, 128],
|
|
1363
|
+
green: [0, 128, 0],
|
|
1364
|
+
greenyellow: [173, 255, 47],
|
|
1365
|
+
grey: [128, 128, 128],
|
|
1366
|
+
honeydew: [240, 255, 240],
|
|
1367
|
+
hotpink: [255, 105, 180],
|
|
1368
|
+
indianred: [205, 92, 92],
|
|
1369
|
+
indigo: [75, 0, 130],
|
|
1370
|
+
ivory: [255, 255, 240],
|
|
1371
|
+
khaki: [240, 230, 140],
|
|
1372
|
+
lavender: [230, 230, 250],
|
|
1373
|
+
lavenderblush: [255, 240, 245],
|
|
1374
|
+
lawngreen: [124, 252, 0],
|
|
1375
|
+
lemonchiffon: [255, 250, 205],
|
|
1376
|
+
lightblue: [173, 216, 230],
|
|
1377
|
+
lightcoral: [240, 128, 128],
|
|
1378
|
+
lightcyan: [224, 255, 255],
|
|
1379
|
+
lightgoldenrodyellow: [250, 250, 210],
|
|
1380
|
+
lightgray: [211, 211, 211],
|
|
1381
|
+
lightgreen: [144, 238, 144],
|
|
1382
|
+
lightgrey: [211, 211, 211],
|
|
1383
|
+
lightpink: [255, 182, 193],
|
|
1384
|
+
lightsalmon: [255, 160, 122],
|
|
1385
|
+
lightseagreen: [32, 178, 170],
|
|
1386
|
+
lightskyblue: [135, 206, 250],
|
|
1387
|
+
lightslategray: [119, 136, 153],
|
|
1388
|
+
lightslategrey: [119, 136, 153],
|
|
1389
|
+
lightsteelblue: [176, 196, 222],
|
|
1390
|
+
lightyellow: [255, 255, 224],
|
|
1391
|
+
lime: [0, 255, 0],
|
|
1392
|
+
limegreen: [50, 205, 50],
|
|
1393
|
+
linen: [250, 240, 230],
|
|
1394
|
+
magenta: [255, 0, 255],
|
|
1395
|
+
maroon: [128, 0, 0],
|
|
1396
|
+
mediumaquamarine: [102, 205, 170],
|
|
1397
|
+
mediumblue: [0, 0, 205],
|
|
1398
|
+
mediumorchid: [186, 85, 211],
|
|
1399
|
+
mediumpurple: [147, 112, 219],
|
|
1400
|
+
mediumseagreen: [60, 179, 113],
|
|
1401
|
+
mediumslateblue: [123, 104, 238],
|
|
1402
|
+
mediumspringgreen: [0, 250, 154],
|
|
1403
|
+
mediumturquoise: [72, 209, 204],
|
|
1404
|
+
mediumvioletred: [199, 21, 133],
|
|
1405
|
+
midnightblue: [25, 25, 112],
|
|
1406
|
+
mintcream: [245, 255, 250],
|
|
1407
|
+
mistyrose: [255, 228, 225],
|
|
1408
|
+
moccasin: [255, 228, 181],
|
|
1409
|
+
navajowhite: [255, 222, 173],
|
|
1410
|
+
navy: [0, 0, 128],
|
|
1411
|
+
oldlace: [253, 245, 230],
|
|
1412
|
+
olive: [128, 128, 0],
|
|
1413
|
+
olivedrab: [107, 142, 35],
|
|
1414
|
+
orange: [255, 165, 0],
|
|
1415
|
+
orangered: [255, 69, 0],
|
|
1416
|
+
orchid: [218, 112, 214],
|
|
1417
|
+
palegoldenrod: [238, 232, 170],
|
|
1418
|
+
palegreen: [152, 251, 152],
|
|
1419
|
+
paleturquoise: [175, 238, 238],
|
|
1420
|
+
palevioletred: [219, 112, 147],
|
|
1421
|
+
papayawhip: [255, 239, 213],
|
|
1422
|
+
peachpuff: [255, 218, 185],
|
|
1423
|
+
peru: [205, 133, 63],
|
|
1424
|
+
pink: [255, 192, 203],
|
|
1425
|
+
plum: [221, 160, 221],
|
|
1426
|
+
powderblue: [176, 224, 230],
|
|
1427
|
+
purple: [128, 0, 128],
|
|
1428
|
+
rebeccapurple: [102, 51, 153],
|
|
1429
|
+
red: [255, 0, 0],
|
|
1430
|
+
rosybrown: [188, 143, 143],
|
|
1431
|
+
royalblue: [65, 105, 225],
|
|
1432
|
+
saddlebrown: [139, 69, 19],
|
|
1433
|
+
salmon: [250, 128, 114],
|
|
1434
|
+
sandybrown: [244, 164, 96],
|
|
1435
|
+
seagreen: [46, 139, 87],
|
|
1436
|
+
seashell: [255, 245, 238],
|
|
1437
|
+
sienna: [160, 82, 45],
|
|
1438
|
+
silver: [192, 192, 192],
|
|
1439
|
+
skyblue: [135, 206, 235],
|
|
1440
|
+
slateblue: [106, 90, 205],
|
|
1441
|
+
slategray: [112, 128, 144],
|
|
1442
|
+
slategrey: [112, 128, 144],
|
|
1443
|
+
snow: [255, 250, 250],
|
|
1444
|
+
springgreen: [0, 255, 127],
|
|
1445
|
+
steelblue: [70, 130, 180],
|
|
1446
|
+
tan: [210, 180, 140],
|
|
1447
|
+
teal: [0, 128, 128],
|
|
1448
|
+
thistle: [216, 191, 216],
|
|
1449
|
+
tomato: [255, 99, 71],
|
|
1450
|
+
turquoise: [64, 224, 208],
|
|
1451
|
+
violet: [238, 130, 238],
|
|
1452
|
+
wheat: [245, 222, 179],
|
|
1453
|
+
white: [255, 255, 255],
|
|
1454
|
+
whitesmoke: [245, 245, 245],
|
|
1455
|
+
yellow: [255, 255, 0],
|
|
1456
|
+
yellowgreen: [154, 205, 50]
|
|
1457
|
+
};
|
|
1458
|
+
},
|
|
1459
|
+
87: (e2) => {
|
|
1460
|
+
"use strict";
|
|
1461
|
+
e2.exports = require("os");
|
|
1462
|
+
},
|
|
1463
|
+
867: (e2) => {
|
|
1464
|
+
"use strict";
|
|
1465
|
+
e2.exports = require("tty");
|
|
1466
|
+
}
|
|
1467
|
+
};
|
|
1468
|
+
var t = {};
|
|
1469
|
+
function __nccwpck_require__(n) {
|
|
1470
|
+
if (t[n]) {
|
|
1471
|
+
return t[n].exports;
|
|
1472
|
+
}
|
|
1473
|
+
var r = t[n] = { id: n, loaded: false, exports: {} };
|
|
1474
|
+
var o = true;
|
|
1475
|
+
try {
|
|
1476
|
+
e[n](r, r.exports, __nccwpck_require__);
|
|
1477
|
+
o = false;
|
|
1478
|
+
} finally {
|
|
1479
|
+
if (o)
|
|
1480
|
+
delete t[n];
|
|
1481
|
+
}
|
|
1482
|
+
r.loaded = true;
|
|
1483
|
+
return r.exports;
|
|
1484
|
+
}
|
|
1485
|
+
(() => {
|
|
1486
|
+
__nccwpck_require__.nmd = (e2) => {
|
|
1487
|
+
e2.paths = [];
|
|
1488
|
+
if (!e2.children)
|
|
1489
|
+
e2.children = [];
|
|
1490
|
+
return e2;
|
|
1491
|
+
};
|
|
1492
|
+
})();
|
|
1493
|
+
__nccwpck_require__.ab = __dirname + "/";
|
|
1494
|
+
return __nccwpck_require__(818);
|
|
1495
|
+
})();
|