mystmd 1.3.9__py3-none-any.whl → 1.3.10__py3-none-any.whl
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.
- {mystmd-1.3.9.dist-info → mystmd-1.3.10.dist-info}/METADATA +1 -1
- mystmd-1.3.10.dist-info/RECORD +9 -0
- mystmd_py/myst.cjs +1062 -710
- mystmd-1.3.9.dist-info/RECORD +0 -9
- {mystmd-1.3.9.dist-info → mystmd-1.3.10.dist-info}/WHEEL +0 -0
- {mystmd-1.3.9.dist-info → mystmd-1.3.10.dist-info}/entry_points.txt +0 -0
- {mystmd-1.3.9.dist-info → mystmd-1.3.10.dist-info}/licenses/LICENSE +0 -0
mystmd_py/myst.cjs
CHANGED
@@ -1577,7 +1577,7 @@ var require_is_constructor = __commonJS({
|
|
1577
1577
|
var inspectSource = require_inspect_source();
|
1578
1578
|
var noop5 = function() {
|
1579
1579
|
};
|
1580
|
-
var
|
1580
|
+
var empty6 = [];
|
1581
1581
|
var construct = getBuiltIn("Reflect", "construct");
|
1582
1582
|
var constructorRegExp = /^\s*(?:class|function)\b/;
|
1583
1583
|
var exec3 = uncurryThis(constructorRegExp.exec);
|
@@ -1586,7 +1586,7 @@ var require_is_constructor = __commonJS({
|
|
1586
1586
|
if (!isCallable(argument2))
|
1587
1587
|
return false;
|
1588
1588
|
try {
|
1589
|
-
construct(noop5,
|
1589
|
+
construct(noop5, empty6, argument2);
|
1590
1590
|
return true;
|
1591
1591
|
} catch (error) {
|
1592
1592
|
return false;
|
@@ -7638,7 +7638,7 @@ var require_es_object_has_own = __commonJS({
|
|
7638
7638
|
// ../../node_modules/core-js/internals/same-value.js
|
7639
7639
|
var require_same_value = __commonJS({
|
7640
7640
|
"../../node_modules/core-js/internals/same-value.js"(exports2, module2) {
|
7641
|
-
module2.exports = Object.is || function
|
7641
|
+
module2.exports = Object.is || function is5(x2, y) {
|
7642
7642
|
return x2 === y ? x2 !== 0 || 1 / x2 === 1 / y : x2 != x2 && y != y;
|
7643
7643
|
};
|
7644
7644
|
}
|
@@ -7648,9 +7648,9 @@ var require_same_value = __commonJS({
|
|
7648
7648
|
var require_es_object_is = __commonJS({
|
7649
7649
|
"../../node_modules/core-js/modules/es.object.is.js"() {
|
7650
7650
|
var $2 = require_export();
|
7651
|
-
var
|
7651
|
+
var is5 = require_same_value();
|
7652
7652
|
$2({ target: "Object", stat: true }, {
|
7653
|
-
is:
|
7653
|
+
is: is5
|
7654
7654
|
});
|
7655
7655
|
}
|
7656
7656
|
});
|
@@ -8352,15 +8352,15 @@ var require_es_promise_constructor = __commonJS({
|
|
8352
8352
|
};
|
8353
8353
|
var callReaction = function(reaction, state) {
|
8354
8354
|
var value = state.value;
|
8355
|
-
var
|
8356
|
-
var handler =
|
8355
|
+
var ok4 = state.state == FULFILLED;
|
8356
|
+
var handler = ok4 ? reaction.ok : reaction.fail;
|
8357
8357
|
var resolve9 = reaction.resolve;
|
8358
8358
|
var reject = reaction.reject;
|
8359
8359
|
var domain = reaction.domain;
|
8360
8360
|
var result, then, exited;
|
8361
8361
|
try {
|
8362
8362
|
if (handler) {
|
8363
|
-
if (!
|
8363
|
+
if (!ok4) {
|
8364
8364
|
if (state.rejection === UNHANDLED)
|
8365
8365
|
onHandleUnhandled(state);
|
8366
8366
|
state.rejection = HANDLED;
|
@@ -11184,8 +11184,8 @@ var require_es_string_fontcolor = __commonJS({
|
|
11184
11184
|
var createHTML = require_create_html();
|
11185
11185
|
var forcedStringHTMLMethod = require_string_html_forced();
|
11186
11186
|
$2({ target: "String", proto: true, forced: forcedStringHTMLMethod("fontcolor") }, {
|
11187
|
-
fontcolor: function fontcolor(
|
11188
|
-
return createHTML(this, "font", "color",
|
11187
|
+
fontcolor: function fontcolor(color3) {
|
11188
|
+
return createHTML(this, "font", "color", color3);
|
11189
11189
|
}
|
11190
11190
|
});
|
11191
11191
|
}
|
@@ -23381,7 +23381,7 @@ var require_pretty_hrtime = __commonJS({
|
|
23381
23381
|
"use strict";
|
23382
23382
|
var minimalDesc = ["h", "min", "s", "ms", "\u03BCs", "ns"];
|
23383
23383
|
var verboseDesc = ["hour", "minute", "second", "millisecond", "microsecond", "nanosecond"];
|
23384
|
-
var
|
23384
|
+
var convert6 = [60 * 60, 60, 1, 1e6, 1e3, 1];
|
23385
23385
|
module2.exports = function(source2, opts) {
|
23386
23386
|
var verbose, precise, i2, spot, sourceAtStep, valAtStep, decimals, strAtStep, results, totalSeconds;
|
23387
23387
|
verbose = false;
|
@@ -23406,12 +23406,12 @@ var require_pretty_hrtime = __commonJS({
|
|
23406
23406
|
spot = i2 < 3 ? 0 : 1;
|
23407
23407
|
sourceAtStep = source2[spot];
|
23408
23408
|
if (i2 !== 3 && i2 !== 0) {
|
23409
|
-
sourceAtStep = sourceAtStep %
|
23409
|
+
sourceAtStep = sourceAtStep % convert6[i2 - 1];
|
23410
23410
|
}
|
23411
23411
|
if (i2 === 2) {
|
23412
23412
|
sourceAtStep += source2[1] / 1e9;
|
23413
23413
|
}
|
23414
|
-
valAtStep = sourceAtStep /
|
23414
|
+
valAtStep = sourceAtStep / convert6[i2];
|
23415
23415
|
if (valAtStep >= 1) {
|
23416
23416
|
if (verbose) {
|
23417
23417
|
valAtStep = Math.floor(valAtStep);
|
@@ -34305,9 +34305,9 @@ var require_lib4 = __commonJS({
|
|
34305
34305
|
FetchError2.prototype = Object.create(Error.prototype);
|
34306
34306
|
FetchError2.prototype.constructor = FetchError2;
|
34307
34307
|
FetchError2.prototype.name = "FetchError";
|
34308
|
-
var
|
34308
|
+
var convert6;
|
34309
34309
|
try {
|
34310
|
-
|
34310
|
+
convert6 = require("encoding").convert;
|
34311
34311
|
} catch (e2) {
|
34312
34312
|
}
|
34313
34313
|
var INTERNALS4 = Symbol("Body internals");
|
@@ -34514,7 +34514,7 @@ var require_lib4 = __commonJS({
|
|
34514
34514
|
});
|
34515
34515
|
}
|
34516
34516
|
function convertBody(buffer2, headers) {
|
34517
|
-
if (typeof
|
34517
|
+
if (typeof convert6 !== "function") {
|
34518
34518
|
throw new Error("The package `encoding` must be installed to use the textConverted() function");
|
34519
34519
|
}
|
34520
34520
|
const ct = headers.get("content-type");
|
@@ -34548,7 +34548,7 @@ var require_lib4 = __commonJS({
|
|
34548
34548
|
charset = "gb18030";
|
34549
34549
|
}
|
34550
34550
|
}
|
34551
|
-
return
|
34551
|
+
return convert6(buffer2, "UTF-8", charset).toString();
|
34552
34552
|
}
|
34553
34553
|
function isURLSearchParams(obj) {
|
34554
34554
|
if (typeof obj !== "object" || typeof obj.append !== "function" || typeof obj.delete !== "function" || typeof obj.get !== "function" || typeof obj.getAll !== "function" || typeof obj.has !== "function" || typeof obj.set !== "function") {
|
@@ -35861,9 +35861,9 @@ var require_lib5 = __commonJS({
|
|
35861
35861
|
FetchError2.prototype = Object.create(Error.prototype);
|
35862
35862
|
FetchError2.prototype.constructor = FetchError2;
|
35863
35863
|
FetchError2.prototype.name = "FetchError";
|
35864
|
-
var
|
35864
|
+
var convert6;
|
35865
35865
|
try {
|
35866
|
-
|
35866
|
+
convert6 = require("encoding").convert;
|
35867
35867
|
} catch (e2) {
|
35868
35868
|
}
|
35869
35869
|
var INTERNALS4 = Symbol("Body internals");
|
@@ -36070,7 +36070,7 @@ var require_lib5 = __commonJS({
|
|
36070
36070
|
});
|
36071
36071
|
}
|
36072
36072
|
function convertBody(buffer2, headers) {
|
36073
|
-
if (typeof
|
36073
|
+
if (typeof convert6 !== "function") {
|
36074
36074
|
throw new Error("The package `encoding` must be installed to use the textConverted() function");
|
36075
36075
|
}
|
36076
36076
|
const ct = headers.get("content-type");
|
@@ -36104,7 +36104,7 @@ var require_lib5 = __commonJS({
|
|
36104
36104
|
charset = "gb18030";
|
36105
36105
|
}
|
36106
36106
|
}
|
36107
|
-
return
|
36107
|
+
return convert6(buffer2, "UTF-8", charset).toString();
|
36108
36108
|
}
|
36109
36109
|
function isURLSearchParams(obj) {
|
36110
36110
|
if (typeof obj !== "object" || typeof obj.append !== "function" || typeof obj.delete !== "function" || typeof obj.get !== "function" || typeof obj.getAll !== "function" || typeof obj.has !== "function" || typeof obj.set !== "function") {
|
@@ -37424,7 +37424,7 @@ var require_translator = __commonJS({
|
|
37424
37424
|
function parsePropStatement(prop, toSource) {
|
37425
37425
|
let inputProp;
|
37426
37426
|
let outputProp;
|
37427
|
-
let
|
37427
|
+
let convert6;
|
37428
37428
|
let condition;
|
37429
37429
|
if (typeof prop === "string") {
|
37430
37430
|
inputProp = outputProp = prop;
|
@@ -37432,7 +37432,7 @@ var require_translator = __commonJS({
|
|
37432
37432
|
inputProp = toSource ? prop.target : prop.source;
|
37433
37433
|
outputProp = toSource ? prop.source : prop.target;
|
37434
37434
|
if (prop.convert) {
|
37435
|
-
|
37435
|
+
convert6 = toSource ? prop.convert.toSource : prop.convert.toTarget;
|
37436
37436
|
}
|
37437
37437
|
if (prop.when) {
|
37438
37438
|
condition = toSource ? prop.when.target : prop.when.source;
|
@@ -37448,7 +37448,7 @@ var require_translator = __commonJS({
|
|
37448
37448
|
return {
|
37449
37449
|
inputProp,
|
37450
37450
|
outputProp,
|
37451
|
-
convert:
|
37451
|
+
convert: convert6,
|
37452
37452
|
condition
|
37453
37453
|
};
|
37454
37454
|
}
|
@@ -37460,7 +37460,7 @@ var require_translator = __commonJS({
|
|
37460
37460
|
for (const {
|
37461
37461
|
inputProp,
|
37462
37462
|
outputProp,
|
37463
|
-
convert:
|
37463
|
+
convert: convert6,
|
37464
37464
|
condition
|
37465
37465
|
} of props) {
|
37466
37466
|
if (outputProp.length === 0) {
|
@@ -37471,9 +37471,9 @@ var require_translator = __commonJS({
|
|
37471
37471
|
continue;
|
37472
37472
|
}
|
37473
37473
|
let outputData = inputProp.map((prop) => input3[prop]);
|
37474
|
-
if (
|
37474
|
+
if (convert6) {
|
37475
37475
|
try {
|
37476
|
-
const converted =
|
37476
|
+
const converted = convert6.apply(input3, outputData);
|
37477
37477
|
outputData = outputProp.length === 1 ? [converted] : converted;
|
37478
37478
|
} catch (cause) {
|
37479
37479
|
throw new Error(`Failed to convert ${inputProp} to ${outputProp}`, {
|
@@ -38634,7 +38634,7 @@ var require_input3 = __commonJS({
|
|
38634
38634
|
value: true
|
38635
38635
|
});
|
38636
38636
|
exports2.ref = exports2.parsers = exports2.formats = void 0;
|
38637
|
-
var
|
38637
|
+
var empty6 = _interopRequireWildcard(require_empty());
|
38638
38638
|
var json2 = _interopRequireWildcard(require_json());
|
38639
38639
|
var jquery = _interopRequireWildcard(require_jquery());
|
38640
38640
|
var html7 = _interopRequireWildcard(require_html3());
|
@@ -38664,28 +38664,28 @@ var require_input3 = __commonJS({
|
|
38664
38664
|
}
|
38665
38665
|
var ref = exports2.ref = "@else";
|
38666
38666
|
var parsers = exports2.parsers = {
|
38667
|
-
empty:
|
38667
|
+
empty: empty6,
|
38668
38668
|
json: json2,
|
38669
38669
|
jquery,
|
38670
38670
|
html: html7
|
38671
38671
|
};
|
38672
38672
|
var formats = exports2.formats = {
|
38673
38673
|
"@empty/text": {
|
38674
|
-
parse:
|
38674
|
+
parse: empty6.parse,
|
38675
38675
|
parseType: {
|
38676
38676
|
dataType: "String",
|
38677
38677
|
predicate: (input3) => input3 === ""
|
38678
38678
|
}
|
38679
38679
|
},
|
38680
38680
|
"@empty/whitespace+text": {
|
38681
|
-
parse:
|
38681
|
+
parse: empty6.parse,
|
38682
38682
|
parseType: {
|
38683
38683
|
dataType: "String",
|
38684
38684
|
predicate: /^\s+$/
|
38685
38685
|
}
|
38686
38686
|
},
|
38687
38687
|
"@empty": {
|
38688
|
-
parse:
|
38688
|
+
parse: empty6.parse,
|
38689
38689
|
parseType: {
|
38690
38690
|
dataType: "Primitive",
|
38691
38691
|
predicate: (input3) => input3 == null
|
@@ -43271,9 +43271,9 @@ var require_terminal_highlight = __commonJS({
|
|
43271
43271
|
let result = "";
|
43272
43272
|
while (!processor2.endOfFile()) {
|
43273
43273
|
let token = processor2.nextToken();
|
43274
|
-
let
|
43275
|
-
if (
|
43276
|
-
result += token[1].split(/\r?\n/).map((i2) =>
|
43274
|
+
let color3 = HIGHLIGHT_THEME[getTokenType(token, processor2)];
|
43275
|
+
if (color3) {
|
43276
|
+
result += token[1].split(/\r?\n/).map((i2) => color3(i2)).join("\n");
|
43277
43277
|
} else {
|
43278
43278
|
result += token[1];
|
43279
43279
|
}
|
@@ -43329,14 +43329,14 @@ var require_css_syntax_error = __commonJS({
|
|
43329
43329
|
}
|
43330
43330
|
this.message += ": " + this.reason;
|
43331
43331
|
}
|
43332
|
-
showSourceCode(
|
43332
|
+
showSourceCode(color3) {
|
43333
43333
|
if (!this.source)
|
43334
43334
|
return "";
|
43335
43335
|
let css = this.source;
|
43336
|
-
if (
|
43337
|
-
|
43336
|
+
if (color3 == null)
|
43337
|
+
color3 = pico.isColorSupported;
|
43338
43338
|
if (terminalHighlight) {
|
43339
|
-
if (
|
43339
|
+
if (color3)
|
43340
43340
|
css = terminalHighlight(css);
|
43341
43341
|
}
|
43342
43342
|
let lines = css.split(/\r?\n/);
|
@@ -43344,7 +43344,7 @@ var require_css_syntax_error = __commonJS({
|
|
43344
43344
|
let end = Math.min(this.line + 2, lines.length);
|
43345
43345
|
let maxWidth = String(end).length;
|
43346
43346
|
let mark2, aside;
|
43347
|
-
if (
|
43347
|
+
if (color3) {
|
43348
43348
|
let { bold, gray, red } = pico.createColors(true);
|
43349
43349
|
mark2 = (text7) => bold(red(text7));
|
43350
43350
|
aside = (text7) => gray(text7);
|
@@ -48353,18 +48353,18 @@ var require_lazy_result = __commonJS({
|
|
48353
48353
|
}
|
48354
48354
|
}
|
48355
48355
|
visitTick(stack) {
|
48356
|
-
let
|
48357
|
-
let { node: node3, visitors } =
|
48356
|
+
let visit4 = stack[stack.length - 1];
|
48357
|
+
let { node: node3, visitors } = visit4;
|
48358
48358
|
if (node3.type !== "root" && node3.type !== "document" && !node3.parent) {
|
48359
48359
|
stack.pop();
|
48360
48360
|
return;
|
48361
48361
|
}
|
48362
|
-
if (visitors.length > 0 &&
|
48363
|
-
let [plugin5, visitor] = visitors[
|
48364
|
-
|
48365
|
-
if (
|
48366
|
-
|
48367
|
-
|
48362
|
+
if (visitors.length > 0 && visit4.visitorIndex < visitors.length) {
|
48363
|
+
let [plugin5, visitor] = visitors[visit4.visitorIndex];
|
48364
|
+
visit4.visitorIndex += 1;
|
48365
|
+
if (visit4.visitorIndex === visitors.length) {
|
48366
|
+
visit4.visitors = [];
|
48367
|
+
visit4.visitorIndex = 0;
|
48368
48368
|
}
|
48369
48369
|
this.result.lastPlugin = plugin5;
|
48370
48370
|
try {
|
@@ -48373,8 +48373,8 @@ var require_lazy_result = __commonJS({
|
|
48373
48373
|
throw this.handleError(e2, node3);
|
48374
48374
|
}
|
48375
48375
|
}
|
48376
|
-
if (
|
48377
|
-
let iterator =
|
48376
|
+
if (visit4.iterator !== 0) {
|
48377
|
+
let iterator = visit4.iterator;
|
48378
48378
|
let child;
|
48379
48379
|
while (child = node3.nodes[node3.indexes[iterator]]) {
|
48380
48380
|
node3.indexes[iterator] += 1;
|
@@ -48384,21 +48384,21 @@ var require_lazy_result = __commonJS({
|
|
48384
48384
|
return;
|
48385
48385
|
}
|
48386
48386
|
}
|
48387
|
-
|
48387
|
+
visit4.iterator = 0;
|
48388
48388
|
delete node3.indexes[iterator];
|
48389
48389
|
}
|
48390
|
-
let events =
|
48391
|
-
while (
|
48392
|
-
let event = events[
|
48393
|
-
|
48390
|
+
let events = visit4.events;
|
48391
|
+
while (visit4.eventIndex < events.length) {
|
48392
|
+
let event = events[visit4.eventIndex];
|
48393
|
+
visit4.eventIndex += 1;
|
48394
48394
|
if (event === CHILDREN) {
|
48395
48395
|
if (node3.nodes && node3.nodes.length) {
|
48396
48396
|
node3[isClean] = true;
|
48397
|
-
|
48397
|
+
visit4.iterator = node3.getIterator();
|
48398
48398
|
}
|
48399
48399
|
return;
|
48400
48400
|
} else if (this.listeners[event]) {
|
48401
|
-
|
48401
|
+
visit4.visitors = this.listeners[event];
|
48402
48402
|
return;
|
48403
48403
|
}
|
48404
48404
|
}
|
@@ -74444,7 +74444,7 @@ var require_conversions = __commonJS({
|
|
74444
74444
|
for (const key2 of Object.keys(cssKeywords)) {
|
74445
74445
|
reverseKeywords[cssKeywords[key2]] = key2;
|
74446
74446
|
}
|
74447
|
-
var
|
74447
|
+
var convert6 = {
|
74448
74448
|
rgb: { channels: 3, labels: "rgb" },
|
74449
74449
|
hsl: { channels: 3, labels: "hsl" },
|
74450
74450
|
hsv: { channels: 3, labels: "hsv" },
|
@@ -74461,24 +74461,24 @@ var require_conversions = __commonJS({
|
|
74461
74461
|
apple: { channels: 3, labels: ["r16", "g16", "b16"] },
|
74462
74462
|
gray: { channels: 1, labels: ["gray"] }
|
74463
74463
|
};
|
74464
|
-
module2.exports =
|
74465
|
-
for (const model of Object.keys(
|
74466
|
-
if (!("channels" in
|
74464
|
+
module2.exports = convert6;
|
74465
|
+
for (const model of Object.keys(convert6)) {
|
74466
|
+
if (!("channels" in convert6[model])) {
|
74467
74467
|
throw new Error("missing channels property: " + model);
|
74468
74468
|
}
|
74469
|
-
if (!("labels" in
|
74469
|
+
if (!("labels" in convert6[model])) {
|
74470
74470
|
throw new Error("missing channel labels property: " + model);
|
74471
74471
|
}
|
74472
|
-
if (
|
74472
|
+
if (convert6[model].labels.length !== convert6[model].channels) {
|
74473
74473
|
throw new Error("channel and label counts mismatch: " + model);
|
74474
74474
|
}
|
74475
|
-
const { channels, labels } =
|
74476
|
-
delete
|
74477
|
-
delete
|
74478
|
-
Object.defineProperty(
|
74479
|
-
Object.defineProperty(
|
74475
|
+
const { channels, labels } = convert6[model];
|
74476
|
+
delete convert6[model].channels;
|
74477
|
+
delete convert6[model].labels;
|
74478
|
+
Object.defineProperty(convert6[model], "channels", { value: channels });
|
74479
|
+
Object.defineProperty(convert6[model], "labels", { value: labels });
|
74480
74480
|
}
|
74481
|
-
|
74481
|
+
convert6.rgb.hsl = function(rgb) {
|
74482
74482
|
const r2 = rgb[0] / 255;
|
74483
74483
|
const g = rgb[1] / 255;
|
74484
74484
|
const b = rgb[2] / 255;
|
@@ -74510,7 +74510,7 @@ var require_conversions = __commonJS({
|
|
74510
74510
|
}
|
74511
74511
|
return [h4, s5 * 100, l * 100];
|
74512
74512
|
};
|
74513
|
-
|
74513
|
+
convert6.rgb.hsv = function(rgb) {
|
74514
74514
|
let rdif;
|
74515
74515
|
let gdif;
|
74516
74516
|
let bdif;
|
@@ -74551,16 +74551,16 @@ var require_conversions = __commonJS({
|
|
74551
74551
|
v * 100
|
74552
74552
|
];
|
74553
74553
|
};
|
74554
|
-
|
74554
|
+
convert6.rgb.hwb = function(rgb) {
|
74555
74555
|
const r2 = rgb[0];
|
74556
74556
|
const g = rgb[1];
|
74557
74557
|
let b = rgb[2];
|
74558
|
-
const h4 =
|
74558
|
+
const h4 = convert6.rgb.hsl(rgb)[0];
|
74559
74559
|
const w = 1 / 255 * Math.min(r2, Math.min(g, b));
|
74560
74560
|
b = 1 - 1 / 255 * Math.max(r2, Math.max(g, b));
|
74561
74561
|
return [h4, w * 100, b * 100];
|
74562
74562
|
};
|
74563
|
-
|
74563
|
+
convert6.rgb.cmyk = function(rgb) {
|
74564
74564
|
const r2 = rgb[0] / 255;
|
74565
74565
|
const g = rgb[1] / 255;
|
74566
74566
|
const b = rgb[2] / 255;
|
@@ -74573,7 +74573,7 @@ var require_conversions = __commonJS({
|
|
74573
74573
|
function comparativeDistance(x2, y) {
|
74574
74574
|
return (x2[0] - y[0]) ** 2 + (x2[1] - y[1]) ** 2 + (x2[2] - y[2]) ** 2;
|
74575
74575
|
}
|
74576
|
-
|
74576
|
+
convert6.rgb.keyword = function(rgb) {
|
74577
74577
|
const reversed = reverseKeywords[rgb];
|
74578
74578
|
if (reversed) {
|
74579
74579
|
return reversed;
|
@@ -74590,10 +74590,10 @@ var require_conversions = __commonJS({
|
|
74590
74590
|
}
|
74591
74591
|
return currentClosestKeyword;
|
74592
74592
|
};
|
74593
|
-
|
74593
|
+
convert6.keyword.rgb = function(keyword) {
|
74594
74594
|
return cssKeywords[keyword];
|
74595
74595
|
};
|
74596
|
-
|
74596
|
+
convert6.rgb.xyz = function(rgb) {
|
74597
74597
|
let r2 = rgb[0] / 255;
|
74598
74598
|
let g = rgb[1] / 255;
|
74599
74599
|
let b = rgb[2] / 255;
|
@@ -74605,8 +74605,8 @@ var require_conversions = __commonJS({
|
|
74605
74605
|
const z2 = r2 * 0.0193 + g * 0.1192 + b * 0.9505;
|
74606
74606
|
return [x2 * 100, y * 100, z2 * 100];
|
74607
74607
|
};
|
74608
|
-
|
74609
|
-
const xyz =
|
74608
|
+
convert6.rgb.lab = function(rgb) {
|
74609
|
+
const xyz = convert6.rgb.xyz(rgb);
|
74610
74610
|
let x2 = xyz[0];
|
74611
74611
|
let y = xyz[1];
|
74612
74612
|
let z2 = xyz[2];
|
@@ -74621,7 +74621,7 @@ var require_conversions = __commonJS({
|
|
74621
74621
|
const b = 200 * (y - z2);
|
74622
74622
|
return [l, a2, b];
|
74623
74623
|
};
|
74624
|
-
|
74624
|
+
convert6.hsl.rgb = function(hsl) {
|
74625
74625
|
const h4 = hsl[0] / 360;
|
74626
74626
|
const s5 = hsl[1] / 100;
|
74627
74627
|
const l = hsl[2] / 100;
|
@@ -74660,7 +74660,7 @@ var require_conversions = __commonJS({
|
|
74660
74660
|
}
|
74661
74661
|
return rgb;
|
74662
74662
|
};
|
74663
|
-
|
74663
|
+
convert6.hsl.hsv = function(hsl) {
|
74664
74664
|
const h4 = hsl[0];
|
74665
74665
|
let s5 = hsl[1] / 100;
|
74666
74666
|
let l = hsl[2] / 100;
|
@@ -74673,7 +74673,7 @@ var require_conversions = __commonJS({
|
|
74673
74673
|
const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s5 / (l + s5);
|
74674
74674
|
return [h4, sv * 100, v * 100];
|
74675
74675
|
};
|
74676
|
-
|
74676
|
+
convert6.hsv.rgb = function(hsv) {
|
74677
74677
|
const h4 = hsv[0] / 60;
|
74678
74678
|
const s5 = hsv[1] / 100;
|
74679
74679
|
let v = hsv[2] / 100;
|
@@ -74698,7 +74698,7 @@ var require_conversions = __commonJS({
|
|
74698
74698
|
return [v, p5, q2];
|
74699
74699
|
}
|
74700
74700
|
};
|
74701
|
-
|
74701
|
+
convert6.hsv.hsl = function(hsv) {
|
74702
74702
|
const h4 = hsv[0];
|
74703
74703
|
const s5 = hsv[1] / 100;
|
74704
74704
|
const v = hsv[2] / 100;
|
@@ -74713,7 +74713,7 @@ var require_conversions = __commonJS({
|
|
74713
74713
|
l /= 2;
|
74714
74714
|
return [h4, sl * 100, l * 100];
|
74715
74715
|
};
|
74716
|
-
|
74716
|
+
convert6.hwb.rgb = function(hwb) {
|
74717
74717
|
const h4 = hwb[0] / 360;
|
74718
74718
|
let wh = hwb[1] / 100;
|
74719
74719
|
let bl = hwb[2] / 100;
|
@@ -74769,7 +74769,7 @@ var require_conversions = __commonJS({
|
|
74769
74769
|
}
|
74770
74770
|
return [r2 * 255, g * 255, b * 255];
|
74771
74771
|
};
|
74772
|
-
|
74772
|
+
convert6.cmyk.rgb = function(cmyk) {
|
74773
74773
|
const c = cmyk[0] / 100;
|
74774
74774
|
const m2 = cmyk[1] / 100;
|
74775
74775
|
const y = cmyk[2] / 100;
|
@@ -74779,7 +74779,7 @@ var require_conversions = __commonJS({
|
|
74779
74779
|
const b = 1 - Math.min(1, y * (1 - k) + k);
|
74780
74780
|
return [r2 * 255, g * 255, b * 255];
|
74781
74781
|
};
|
74782
|
-
|
74782
|
+
convert6.xyz.rgb = function(xyz) {
|
74783
74783
|
const x2 = xyz[0] / 100;
|
74784
74784
|
const y = xyz[1] / 100;
|
74785
74785
|
const z2 = xyz[2] / 100;
|
@@ -74797,7 +74797,7 @@ var require_conversions = __commonJS({
|
|
74797
74797
|
b = Math.min(Math.max(0, b), 1);
|
74798
74798
|
return [r2 * 255, g * 255, b * 255];
|
74799
74799
|
};
|
74800
|
-
|
74800
|
+
convert6.xyz.lab = function(xyz) {
|
74801
74801
|
let x2 = xyz[0];
|
74802
74802
|
let y = xyz[1];
|
74803
74803
|
let z2 = xyz[2];
|
@@ -74812,7 +74812,7 @@ var require_conversions = __commonJS({
|
|
74812
74812
|
const b = 200 * (y - z2);
|
74813
74813
|
return [l, a2, b];
|
74814
74814
|
};
|
74815
|
-
|
74815
|
+
convert6.lab.xyz = function(lab) {
|
74816
74816
|
const l = lab[0];
|
74817
74817
|
const a2 = lab[1];
|
74818
74818
|
const b = lab[2];
|
@@ -74833,7 +74833,7 @@ var require_conversions = __commonJS({
|
|
74833
74833
|
z2 *= 108.883;
|
74834
74834
|
return [x2, y, z2];
|
74835
74835
|
};
|
74836
|
-
|
74836
|
+
convert6.lab.lch = function(lab) {
|
74837
74837
|
const l = lab[0];
|
74838
74838
|
const a2 = lab[1];
|
74839
74839
|
const b = lab[2];
|
@@ -74846,7 +74846,7 @@ var require_conversions = __commonJS({
|
|
74846
74846
|
const c = Math.sqrt(a2 * a2 + b * b);
|
74847
74847
|
return [l, c, h4];
|
74848
74848
|
};
|
74849
|
-
|
74849
|
+
convert6.lch.lab = function(lch) {
|
74850
74850
|
const l = lch[0];
|
74851
74851
|
const c = lch[1];
|
74852
74852
|
const h4 = lch[2];
|
@@ -74855,9 +74855,9 @@ var require_conversions = __commonJS({
|
|
74855
74855
|
const b = c * Math.sin(hr2);
|
74856
74856
|
return [l, a2, b];
|
74857
74857
|
};
|
74858
|
-
|
74858
|
+
convert6.rgb.ansi16 = function(args, saturation = null) {
|
74859
74859
|
const [r2, g, b] = args;
|
74860
|
-
let value = saturation === null ?
|
74860
|
+
let value = saturation === null ? convert6.rgb.hsv(args)[2] : saturation;
|
74861
74861
|
value = Math.round(value / 50);
|
74862
74862
|
if (value === 0) {
|
74863
74863
|
return 30;
|
@@ -74868,10 +74868,10 @@ var require_conversions = __commonJS({
|
|
74868
74868
|
}
|
74869
74869
|
return ansi;
|
74870
74870
|
};
|
74871
|
-
|
74872
|
-
return
|
74871
|
+
convert6.hsv.ansi16 = function(args) {
|
74872
|
+
return convert6.rgb.ansi16(convert6.hsv.rgb(args), args[2]);
|
74873
74873
|
};
|
74874
|
-
|
74874
|
+
convert6.rgb.ansi256 = function(args) {
|
74875
74875
|
const r2 = args[0];
|
74876
74876
|
const g = args[1];
|
74877
74877
|
const b = args[2];
|
@@ -74887,22 +74887,22 @@ var require_conversions = __commonJS({
|
|
74887
74887
|
const ansi = 16 + 36 * Math.round(r2 / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
|
74888
74888
|
return ansi;
|
74889
74889
|
};
|
74890
|
-
|
74891
|
-
let
|
74892
|
-
if (
|
74890
|
+
convert6.ansi16.rgb = function(args) {
|
74891
|
+
let color3 = args % 10;
|
74892
|
+
if (color3 === 0 || color3 === 7) {
|
74893
74893
|
if (args > 50) {
|
74894
|
-
|
74894
|
+
color3 += 3.5;
|
74895
74895
|
}
|
74896
|
-
|
74897
|
-
return [
|
74896
|
+
color3 = color3 / 10.5 * 255;
|
74897
|
+
return [color3, color3, color3];
|
74898
74898
|
}
|
74899
74899
|
const mult = (~~(args > 50) + 1) * 0.5;
|
74900
|
-
const r2 = (
|
74901
|
-
const g = (
|
74902
|
-
const b = (
|
74900
|
+
const r2 = (color3 & 1) * mult * 255;
|
74901
|
+
const g = (color3 >> 1 & 1) * mult * 255;
|
74902
|
+
const b = (color3 >> 2 & 1) * mult * 255;
|
74903
74903
|
return [r2, g, b];
|
74904
74904
|
};
|
74905
|
-
|
74905
|
+
convert6.ansi256.rgb = function(args) {
|
74906
74906
|
if (args >= 232) {
|
74907
74907
|
const c = (args - 232) * 10 + 8;
|
74908
74908
|
return [c, c, c];
|
@@ -74914,12 +74914,12 @@ var require_conversions = __commonJS({
|
|
74914
74914
|
const b = rem % 6 / 5 * 255;
|
74915
74915
|
return [r2, g, b];
|
74916
74916
|
};
|
74917
|
-
|
74917
|
+
convert6.rgb.hex = function(args) {
|
74918
74918
|
const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
|
74919
74919
|
const string2 = integer.toString(16).toUpperCase();
|
74920
74920
|
return "000000".substring(string2.length) + string2;
|
74921
74921
|
};
|
74922
|
-
|
74922
|
+
convert6.hex.rgb = function(args) {
|
74923
74923
|
const match3 = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
74924
74924
|
if (!match3) {
|
74925
74925
|
return [0, 0, 0];
|
@@ -74936,7 +74936,7 @@ var require_conversions = __commonJS({
|
|
74936
74936
|
const b = integer & 255;
|
74937
74937
|
return [r2, g, b];
|
74938
74938
|
};
|
74939
|
-
|
74939
|
+
convert6.rgb.hcg = function(rgb) {
|
74940
74940
|
const r2 = rgb[0] / 255;
|
74941
74941
|
const g = rgb[1] / 255;
|
74942
74942
|
const b = rgb[2] / 255;
|
@@ -74963,7 +74963,7 @@ var require_conversions = __commonJS({
|
|
74963
74963
|
hue %= 1;
|
74964
74964
|
return [hue * 360, chroma * 100, grayscale * 100];
|
74965
74965
|
};
|
74966
|
-
|
74966
|
+
convert6.hsl.hcg = function(hsl) {
|
74967
74967
|
const s5 = hsl[1] / 100;
|
74968
74968
|
const l = hsl[2] / 100;
|
74969
74969
|
const c = l < 0.5 ? 2 * s5 * l : 2 * s5 * (1 - l);
|
@@ -74973,7 +74973,7 @@ var require_conversions = __commonJS({
|
|
74973
74973
|
}
|
74974
74974
|
return [hsl[0], c * 100, f3 * 100];
|
74975
74975
|
};
|
74976
|
-
|
74976
|
+
convert6.hsv.hcg = function(hsv) {
|
74977
74977
|
const s5 = hsv[1] / 100;
|
74978
74978
|
const v = hsv[2] / 100;
|
74979
74979
|
const c = s5 * v;
|
@@ -74983,7 +74983,7 @@ var require_conversions = __commonJS({
|
|
74983
74983
|
}
|
74984
74984
|
return [hsv[0], c * 100, f3 * 100];
|
74985
74985
|
};
|
74986
|
-
|
74986
|
+
convert6.hcg.rgb = function(hcg) {
|
74987
74987
|
const h4 = hcg[0] / 360;
|
74988
74988
|
const c = hcg[1] / 100;
|
74989
74989
|
const g = hcg[2] / 100;
|
@@ -75033,7 +75033,7 @@ var require_conversions = __commonJS({
|
|
75033
75033
|
(c * pure[2] + mg) * 255
|
75034
75034
|
];
|
75035
75035
|
};
|
75036
|
-
|
75036
|
+
convert6.hcg.hsv = function(hcg) {
|
75037
75037
|
const c = hcg[1] / 100;
|
75038
75038
|
const g = hcg[2] / 100;
|
75039
75039
|
const v = c + g * (1 - c);
|
@@ -75043,7 +75043,7 @@ var require_conversions = __commonJS({
|
|
75043
75043
|
}
|
75044
75044
|
return [hcg[0], f3 * 100, v * 100];
|
75045
75045
|
};
|
75046
|
-
|
75046
|
+
convert6.hcg.hsl = function(hcg) {
|
75047
75047
|
const c = hcg[1] / 100;
|
75048
75048
|
const g = hcg[2] / 100;
|
75049
75049
|
const l = g * (1 - c) + 0.5 * c;
|
@@ -75055,13 +75055,13 @@ var require_conversions = __commonJS({
|
|
75055
75055
|
}
|
75056
75056
|
return [hcg[0], s5 * 100, l * 100];
|
75057
75057
|
};
|
75058
|
-
|
75058
|
+
convert6.hcg.hwb = function(hcg) {
|
75059
75059
|
const c = hcg[1] / 100;
|
75060
75060
|
const g = hcg[2] / 100;
|
75061
75061
|
const v = c + g * (1 - c);
|
75062
75062
|
return [hcg[0], (v - c) * 100, (1 - v) * 100];
|
75063
75063
|
};
|
75064
|
-
|
75064
|
+
convert6.hwb.hcg = function(hwb) {
|
75065
75065
|
const w = hwb[1] / 100;
|
75066
75066
|
const b = hwb[2] / 100;
|
75067
75067
|
const v = 1 - b;
|
@@ -75072,35 +75072,35 @@ var require_conversions = __commonJS({
|
|
75072
75072
|
}
|
75073
75073
|
return [hwb[0], c * 100, g * 100];
|
75074
75074
|
};
|
75075
|
-
|
75075
|
+
convert6.apple.rgb = function(apple) {
|
75076
75076
|
return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
|
75077
75077
|
};
|
75078
|
-
|
75078
|
+
convert6.rgb.apple = function(rgb) {
|
75079
75079
|
return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
|
75080
75080
|
};
|
75081
|
-
|
75081
|
+
convert6.gray.rgb = function(args) {
|
75082
75082
|
return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
|
75083
75083
|
};
|
75084
|
-
|
75084
|
+
convert6.gray.hsl = function(args) {
|
75085
75085
|
return [0, 0, args[0]];
|
75086
75086
|
};
|
75087
|
-
|
75088
|
-
|
75087
|
+
convert6.gray.hsv = convert6.gray.hsl;
|
75088
|
+
convert6.gray.hwb = function(gray) {
|
75089
75089
|
return [0, 100, gray[0]];
|
75090
75090
|
};
|
75091
|
-
|
75091
|
+
convert6.gray.cmyk = function(gray) {
|
75092
75092
|
return [0, 0, 0, gray[0]];
|
75093
75093
|
};
|
75094
|
-
|
75094
|
+
convert6.gray.lab = function(gray) {
|
75095
75095
|
return [gray[0], 0, 0];
|
75096
75096
|
};
|
75097
|
-
|
75097
|
+
convert6.gray.hex = function(gray) {
|
75098
75098
|
const val = Math.round(gray[0] / 100 * 255) & 255;
|
75099
75099
|
const integer = (val << 16) + (val << 8) + val;
|
75100
75100
|
const string2 = integer.toString(16).toUpperCase();
|
75101
75101
|
return "000000".substring(string2.length) + string2;
|
75102
75102
|
};
|
75103
|
-
|
75103
|
+
convert6.rgb.gray = function(rgb) {
|
75104
75104
|
const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
|
75105
75105
|
return [val / 255 * 100];
|
75106
75106
|
};
|
@@ -75182,7 +75182,7 @@ var require_color_convert = __commonJS({
|
|
75182
75182
|
"../../node_modules/color/node_modules/color-convert/index.js"(exports2, module2) {
|
75183
75183
|
var conversions = require_conversions();
|
75184
75184
|
var route = require_route();
|
75185
|
-
var
|
75185
|
+
var convert6 = {};
|
75186
75186
|
var models = Object.keys(conversions);
|
75187
75187
|
function wrapRaw(fn) {
|
75188
75188
|
const wrappedFn = function(...args) {
|
@@ -75223,18 +75223,18 @@ var require_color_convert = __commonJS({
|
|
75223
75223
|
return wrappedFn;
|
75224
75224
|
}
|
75225
75225
|
models.forEach((fromModel) => {
|
75226
|
-
|
75227
|
-
Object.defineProperty(
|
75228
|
-
Object.defineProperty(
|
75226
|
+
convert6[fromModel] = {};
|
75227
|
+
Object.defineProperty(convert6[fromModel], "channels", { value: conversions[fromModel].channels });
|
75228
|
+
Object.defineProperty(convert6[fromModel], "labels", { value: conversions[fromModel].labels });
|
75229
75229
|
const routes = route(fromModel);
|
75230
75230
|
const routeModels = Object.keys(routes);
|
75231
75231
|
routeModels.forEach((toModel) => {
|
75232
75232
|
const fn = routes[toModel];
|
75233
|
-
|
75234
|
-
|
75233
|
+
convert6[fromModel][toModel] = wrapRounded(fn);
|
75234
|
+
convert6[fromModel][toModel].raw = wrapRaw(fn);
|
75235
75235
|
});
|
75236
75236
|
});
|
75237
|
-
module2.exports =
|
75237
|
+
module2.exports = convert6;
|
75238
75238
|
}
|
75239
75239
|
});
|
75240
75240
|
|
@@ -75242,7 +75242,7 @@ var require_color_convert = __commonJS({
|
|
75242
75242
|
var require_color = __commonJS({
|
75243
75243
|
"../../node_modules/color/index.js"(exports2, module2) {
|
75244
75244
|
var colorString = require_color_string();
|
75245
|
-
var
|
75245
|
+
var convert6 = require_color_convert();
|
75246
75246
|
var skippedModels = [
|
75247
75247
|
// To be honest, I don't really feel like keyword belongs in color convert, but eh.
|
75248
75248
|
"keyword",
|
@@ -75252,8 +75252,8 @@ var require_color = __commonJS({
|
|
75252
75252
|
"hex"
|
75253
75253
|
];
|
75254
75254
|
var hashedModelKeys = {};
|
75255
|
-
for (const model of Object.keys(
|
75256
|
-
hashedModelKeys[[...
|
75255
|
+
for (const model of Object.keys(convert6)) {
|
75256
|
+
hashedModelKeys[[...convert6[model].labels].sort().join("")] = model;
|
75257
75257
|
}
|
75258
75258
|
var limiters = {};
|
75259
75259
|
function Color3(object, model) {
|
@@ -75263,7 +75263,7 @@ var require_color = __commonJS({
|
|
75263
75263
|
if (model && model in skippedModels) {
|
75264
75264
|
model = null;
|
75265
75265
|
}
|
75266
|
-
if (model && !(model in
|
75266
|
+
if (model && !(model in convert6)) {
|
75267
75267
|
throw new Error("Unknown model: " + model);
|
75268
75268
|
}
|
75269
75269
|
let i2;
|
@@ -75282,12 +75282,12 @@ var require_color = __commonJS({
|
|
75282
75282
|
throw new Error("Unable to parse color from string: " + object);
|
75283
75283
|
}
|
75284
75284
|
this.model = result.model;
|
75285
|
-
channels =
|
75285
|
+
channels = convert6[this.model].channels;
|
75286
75286
|
this.color = result.value.slice(0, channels);
|
75287
75287
|
this.valpha = typeof result.value[channels] === "number" ? result.value[channels] : 1;
|
75288
75288
|
} else if (object.length > 0) {
|
75289
75289
|
this.model = model || "rgb";
|
75290
|
-
channels =
|
75290
|
+
channels = convert6[this.model].channels;
|
75291
75291
|
const newArray = Array.prototype.slice.call(object, 0, channels);
|
75292
75292
|
this.color = zeroArray(newArray, channels);
|
75293
75293
|
this.valpha = typeof object[channels] === "number" ? object[channels] : 1;
|
@@ -75311,15 +75311,15 @@ var require_color = __commonJS({
|
|
75311
75311
|
throw new Error("Unable to parse color from object: " + JSON.stringify(object));
|
75312
75312
|
}
|
75313
75313
|
this.model = hashedModelKeys[hashedKeys];
|
75314
|
-
const { labels } =
|
75315
|
-
const
|
75314
|
+
const { labels } = convert6[this.model];
|
75315
|
+
const color3 = [];
|
75316
75316
|
for (i2 = 0; i2 < labels.length; i2++) {
|
75317
|
-
|
75317
|
+
color3.push(object[labels[i2]]);
|
75318
75318
|
}
|
75319
|
-
this.color = zeroArray(
|
75319
|
+
this.color = zeroArray(color3);
|
75320
75320
|
}
|
75321
75321
|
if (limiters[this.model]) {
|
75322
|
-
channels =
|
75322
|
+
channels = convert6[this.model].channels;
|
75323
75323
|
for (i2 = 0; i2 < channels; i2++) {
|
75324
75324
|
const limit = limiters[this.model][i2];
|
75325
75325
|
if (limit) {
|
@@ -75355,8 +75355,8 @@ var require_color = __commonJS({
|
|
75355
75355
|
},
|
75356
75356
|
object() {
|
75357
75357
|
const result = {};
|
75358
|
-
const { channels } =
|
75359
|
-
const { labels } =
|
75358
|
+
const { channels } = convert6[this.model];
|
75359
|
+
const { labels } = convert6[this.model];
|
75360
75360
|
for (let i2 = 0; i2 < channels; i2++) {
|
75361
75361
|
result[labels[i2]] = this.color[i2];
|
75362
75362
|
}
|
@@ -75422,7 +75422,7 @@ var require_color = __commonJS({
|
|
75422
75422
|
if (value !== void 0) {
|
75423
75423
|
return new Color3(value);
|
75424
75424
|
}
|
75425
|
-
return
|
75425
|
+
return convert6[this.model].keyword(this.color);
|
75426
75426
|
},
|
75427
75427
|
hex(value) {
|
75428
75428
|
if (value !== void 0) {
|
@@ -75454,16 +75454,16 @@ var require_color = __commonJS({
|
|
75454
75454
|
}
|
75455
75455
|
return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
|
75456
75456
|
},
|
75457
|
-
contrast(
|
75457
|
+
contrast(color22) {
|
75458
75458
|
const lum1 = this.luminosity();
|
75459
|
-
const lum2 =
|
75459
|
+
const lum2 = color22.luminosity();
|
75460
75460
|
if (lum1 > lum2) {
|
75461
75461
|
return (lum1 + 0.05) / (lum2 + 0.05);
|
75462
75462
|
}
|
75463
75463
|
return (lum2 + 0.05) / (lum1 + 0.05);
|
75464
75464
|
},
|
75465
|
-
level(
|
75466
|
-
const contrastRatio = this.contrast(
|
75465
|
+
level(color22) {
|
75466
|
+
const contrastRatio = this.contrast(color22);
|
75467
75467
|
if (contrastRatio >= 7) {
|
75468
75468
|
return "AAA";
|
75469
75469
|
}
|
@@ -75538,25 +75538,25 @@ var require_color = __commonJS({
|
|
75538
75538
|
throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor);
|
75539
75539
|
}
|
75540
75540
|
const color1 = mixinColor.rgb();
|
75541
|
-
const
|
75541
|
+
const color22 = this.rgb();
|
75542
75542
|
const p5 = weight === void 0 ? 0.5 : weight;
|
75543
75543
|
const w = 2 * p5 - 1;
|
75544
|
-
const a2 = color1.alpha() -
|
75544
|
+
const a2 = color1.alpha() - color22.alpha();
|
75545
75545
|
const w1 = ((w * a2 === -1 ? w : (w + a2) / (1 + w * a2)) + 1) / 2;
|
75546
75546
|
const w2 = 1 - w1;
|
75547
75547
|
return Color3.rgb(
|
75548
|
-
w1 * color1.red() + w2 *
|
75549
|
-
w1 * color1.green() + w2 *
|
75550
|
-
w1 * color1.blue() + w2 *
|
75551
|
-
color1.alpha() * p5 +
|
75548
|
+
w1 * color1.red() + w2 * color22.red(),
|
75549
|
+
w1 * color1.green() + w2 * color22.green(),
|
75550
|
+
w1 * color1.blue() + w2 * color22.blue(),
|
75551
|
+
color1.alpha() * p5 + color22.alpha() * (1 - p5)
|
75552
75552
|
);
|
75553
75553
|
}
|
75554
75554
|
};
|
75555
|
-
for (const model of Object.keys(
|
75555
|
+
for (const model of Object.keys(convert6)) {
|
75556
75556
|
if (skippedModels.includes(model)) {
|
75557
75557
|
continue;
|
75558
75558
|
}
|
75559
|
-
const { channels } =
|
75559
|
+
const { channels } = convert6[model];
|
75560
75560
|
Color3.prototype[model] = function(...args) {
|
75561
75561
|
if (this.model === model) {
|
75562
75562
|
return new Color3(this);
|
@@ -75564,14 +75564,14 @@ var require_color = __commonJS({
|
|
75564
75564
|
if (args.length > 0) {
|
75565
75565
|
return new Color3(args, model);
|
75566
75566
|
}
|
75567
|
-
return new Color3([...assertArray(
|
75567
|
+
return new Color3([...assertArray(convert6[this.model][model].raw(this.color)), this.valpha], model);
|
75568
75568
|
};
|
75569
75569
|
Color3[model] = function(...args) {
|
75570
|
-
let
|
75571
|
-
if (typeof
|
75572
|
-
|
75570
|
+
let color3 = args[0];
|
75571
|
+
if (typeof color3 === "number") {
|
75572
|
+
color3 = zeroArray(args, channels);
|
75573
75573
|
}
|
75574
|
-
return new Color3(
|
75574
|
+
return new Color3(color3, model);
|
75575
75575
|
};
|
75576
75576
|
}
|
75577
75577
|
function roundTo(number2, places) {
|
@@ -78885,7 +78885,7 @@ var require_parser_block = __commonJS({
|
|
78885
78885
|
}
|
78886
78886
|
}
|
78887
78887
|
ParserBlock.prototype.tokenize = function(state, startLine, endLine) {
|
78888
|
-
var
|
78888
|
+
var ok4, i2, rules = this.ruler.getRules(""), len = rules.length, line2 = startLine, hasEmptyLines = false, maxNesting = state.md.options.maxNesting;
|
78889
78889
|
while (line2 < endLine) {
|
78890
78890
|
state.line = line2 = state.skipEmptyLines(line2);
|
78891
78891
|
if (line2 >= endLine) {
|
@@ -78899,8 +78899,8 @@ var require_parser_block = __commonJS({
|
|
78899
78899
|
break;
|
78900
78900
|
}
|
78901
78901
|
for (i2 = 0; i2 < len; i2++) {
|
78902
|
-
|
78903
|
-
if (
|
78902
|
+
ok4 = rules[i2](state, line2, endLine, false);
|
78903
|
+
if (ok4) {
|
78904
78904
|
break;
|
78905
78905
|
}
|
78906
78906
|
}
|
@@ -79904,7 +79904,7 @@ var require_parser_inline = __commonJS({
|
|
79904
79904
|
}
|
79905
79905
|
}
|
79906
79906
|
ParserInline.prototype.skipToken = function(state) {
|
79907
|
-
var
|
79907
|
+
var ok4, i2, pos = state.pos, rules = this.ruler.getRules(""), len = rules.length, maxNesting = state.md.options.maxNesting, cache = state.cache;
|
79908
79908
|
if (typeof cache[pos] !== "undefined") {
|
79909
79909
|
state.pos = cache[pos];
|
79910
79910
|
return;
|
@@ -79912,32 +79912,32 @@ var require_parser_inline = __commonJS({
|
|
79912
79912
|
if (state.level < maxNesting) {
|
79913
79913
|
for (i2 = 0; i2 < len; i2++) {
|
79914
79914
|
state.level++;
|
79915
|
-
|
79915
|
+
ok4 = rules[i2](state, true);
|
79916
79916
|
state.level--;
|
79917
|
-
if (
|
79917
|
+
if (ok4) {
|
79918
79918
|
break;
|
79919
79919
|
}
|
79920
79920
|
}
|
79921
79921
|
} else {
|
79922
79922
|
state.pos = state.posMax;
|
79923
79923
|
}
|
79924
|
-
if (!
|
79924
|
+
if (!ok4) {
|
79925
79925
|
state.pos++;
|
79926
79926
|
}
|
79927
79927
|
cache[pos] = state.pos;
|
79928
79928
|
};
|
79929
79929
|
ParserInline.prototype.tokenize = function(state) {
|
79930
|
-
var
|
79930
|
+
var ok4, i2, rules = this.ruler.getRules(""), len = rules.length, end = state.posMax, maxNesting = state.md.options.maxNesting;
|
79931
79931
|
while (state.pos < end) {
|
79932
79932
|
if (state.level < maxNesting) {
|
79933
79933
|
for (i2 = 0; i2 < len; i2++) {
|
79934
|
-
|
79935
|
-
if (
|
79934
|
+
ok4 = rules[i2](state, false);
|
79935
|
+
if (ok4) {
|
79936
79936
|
break;
|
79937
79937
|
}
|
79938
79938
|
}
|
79939
79939
|
}
|
79940
|
-
if (
|
79940
|
+
if (ok4) {
|
79941
79941
|
if (state.pos >= end) {
|
79942
79942
|
break;
|
79943
79943
|
}
|
@@ -91624,23 +91624,23 @@ var require_isexe = __commonJS({
|
|
91624
91624
|
throw new TypeError("callback not provided");
|
91625
91625
|
}
|
91626
91626
|
return new Promise(function(resolve9, reject) {
|
91627
|
-
isexe(path41, options || {}, function(er,
|
91627
|
+
isexe(path41, options || {}, function(er, is5) {
|
91628
91628
|
if (er) {
|
91629
91629
|
reject(er);
|
91630
91630
|
} else {
|
91631
|
-
resolve9(
|
91631
|
+
resolve9(is5);
|
91632
91632
|
}
|
91633
91633
|
});
|
91634
91634
|
});
|
91635
91635
|
}
|
91636
|
-
core4(path41, options || {}, function(er,
|
91636
|
+
core4(path41, options || {}, function(er, is5) {
|
91637
91637
|
if (er) {
|
91638
91638
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
91639
91639
|
er = null;
|
91640
|
-
|
91640
|
+
is5 = false;
|
91641
91641
|
}
|
91642
91642
|
}
|
91643
|
-
cb(er,
|
91643
|
+
cb(er, is5);
|
91644
91644
|
});
|
91645
91645
|
}
|
91646
91646
|
function sync2(path41, options) {
|
@@ -91703,8 +91703,8 @@ var require_lib15 = __commonJS({
|
|
91703
91703
|
const p5 = getPathPart(envPart, cmd);
|
91704
91704
|
for (const ext2 of pathExt) {
|
91705
91705
|
const withExt = p5 + ext2;
|
91706
|
-
const
|
91707
|
-
if (
|
91706
|
+
const is5 = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true });
|
91707
|
+
if (is5) {
|
91708
91708
|
if (!opt.all) {
|
91709
91709
|
return withExt;
|
91710
91710
|
}
|
@@ -91727,8 +91727,8 @@ var require_lib15 = __commonJS({
|
|
91727
91727
|
const p5 = getPathPart(pathEnvPart, cmd);
|
91728
91728
|
for (const ext2 of pathExt) {
|
91729
91729
|
const withExt = p5 + ext2;
|
91730
|
-
const
|
91731
|
-
if (
|
91730
|
+
const is5 = isexe.sync(withExt, { pathExt: pathExtExe, ignoreErrors: true });
|
91731
|
+
if (is5) {
|
91732
91732
|
if (!opt.all) {
|
91733
91733
|
return withExt;
|
91734
91734
|
}
|
@@ -98929,9 +98929,9 @@ var require_adm_zip = __commonJS({
|
|
98929
98929
|
return;
|
98930
98930
|
var zipData = _zip.compressToBuffer();
|
98931
98931
|
if (zipData) {
|
98932
|
-
var
|
98932
|
+
var ok4 = filetools.writeFileTo(targetFileName, zipData, true);
|
98933
98933
|
if (typeof callback === "function")
|
98934
|
-
callback(!
|
98934
|
+
callback(!ok4 ? new Error("failed") : null, "");
|
98935
98935
|
}
|
98936
98936
|
},
|
98937
98937
|
writeZipPromise: function(targetFileName, props) {
|
@@ -99297,8 +99297,8 @@ var require_lib16 = __commonJS({
|
|
99297
99297
|
const p5 = getPathPart(envPart, cmd);
|
99298
99298
|
for (const ext2 of pathExt) {
|
99299
99299
|
const withExt = p5 + ext2;
|
99300
|
-
const
|
99301
|
-
if (
|
99300
|
+
const is5 = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true });
|
99301
|
+
if (is5) {
|
99302
99302
|
if (!opt.all) {
|
99303
99303
|
return withExt;
|
99304
99304
|
}
|
@@ -99321,8 +99321,8 @@ var require_lib16 = __commonJS({
|
|
99321
99321
|
const p5 = getPathPart(pathEnvPart, cmd);
|
99322
99322
|
for (const ext2 of pathExt) {
|
99323
99323
|
const withExt = p5 + ext2;
|
99324
|
-
const
|
99325
|
-
if (
|
99324
|
+
const is5 = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true });
|
99325
|
+
if (is5) {
|
99326
99326
|
if (!opt.all) {
|
99327
99327
|
return withExt;
|
99328
99328
|
}
|
@@ -117708,14 +117708,14 @@ var require_build = __commonJS({
|
|
117708
117708
|
super(...arguments), this.xmlKeys = { hide: "m:val" };
|
117709
117709
|
}
|
117710
117710
|
}
|
117711
|
-
class
|
117711
|
+
class is5 extends s5 {
|
117712
117712
|
constructor() {
|
117713
117713
|
super("m:degHide"), this.root.push(new ss({ hide: 1 }));
|
117714
117714
|
}
|
117715
117715
|
}
|
117716
117716
|
class os10 extends s5 {
|
117717
117717
|
constructor(e4) {
|
117718
|
-
super("m:radPr"), e4 || this.root.push(new
|
117718
|
+
super("m:radPr"), e4 || this.root.push(new is5());
|
117719
117719
|
}
|
117720
117720
|
}
|
117721
117721
|
class as extends s5 {
|
@@ -138200,7 +138200,7 @@ var require_request = __commonJS({
|
|
138200
138200
|
return query[name3];
|
138201
138201
|
return defaultValue;
|
138202
138202
|
};
|
138203
|
-
req.is = function
|
138203
|
+
req.is = function is5(types6) {
|
138204
138204
|
var arr = types6;
|
138205
138205
|
if (!Array.isArray(types6)) {
|
138206
138206
|
arr = new Array(arguments.length);
|
@@ -143467,9 +143467,9 @@ var require_Subscription = __commonJS({
|
|
143467
143467
|
}
|
143468
143468
|
};
|
143469
143469
|
Subscription2.EMPTY = function() {
|
143470
|
-
var
|
143471
|
-
|
143472
|
-
return
|
143470
|
+
var empty6 = new Subscription2();
|
143471
|
+
empty6.closed = true;
|
143472
|
+
return empty6;
|
143473
143473
|
}();
|
143474
143474
|
return Subscription2;
|
143475
143475
|
}();
|
@@ -145823,10 +145823,10 @@ var require_empty3 = __commonJS({
|
|
145823
145823
|
exports2.EMPTY = new Observable_1.Observable(function(subscriber) {
|
145824
145824
|
return subscriber.complete();
|
145825
145825
|
});
|
145826
|
-
function
|
145826
|
+
function empty6(scheduler) {
|
145827
145827
|
return scheduler ? emptyScheduled(scheduler) : exports2.EMPTY;
|
145828
145828
|
}
|
145829
|
-
exports2.empty =
|
145829
|
+
exports2.empty = empty6;
|
145830
145830
|
function emptyScheduled(scheduler) {
|
145831
145831
|
return new Observable_1.Observable(function(subscriber) {
|
145832
145832
|
return scheduler.schedule(function() {
|
@@ -155107,10 +155107,10 @@ var require_equalByTag = __commonJS({
|
|
155107
155107
|
case stringTag:
|
155108
155108
|
return object == other + "";
|
155109
155109
|
case mapTag:
|
155110
|
-
var
|
155110
|
+
var convert6 = mapToArray;
|
155111
155111
|
case setTag:
|
155112
155112
|
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
|
155113
|
-
|
155113
|
+
convert6 || (convert6 = setToArray);
|
155114
155114
|
if (object.size != other.size && !isPartial) {
|
155115
155115
|
return false;
|
155116
155116
|
}
|
@@ -155120,7 +155120,7 @@ var require_equalByTag = __commonJS({
|
|
155120
155120
|
}
|
155121
155121
|
bitmask |= COMPARE_UNORDERED_FLAG;
|
155122
155122
|
stack.set(object, other);
|
155123
|
-
var result = equalArrays(
|
155123
|
+
var result = equalArrays(convert6(object), convert6(other), bitmask, customizer, equalFunc, stack);
|
155124
155124
|
stack["delete"](object);
|
155125
155125
|
return result;
|
155126
155126
|
case symbolTag:
|
@@ -156070,7 +156070,7 @@ var require_conversions2 = __commonJS({
|
|
156070
156070
|
for (const key2 of Object.keys(cssKeywords)) {
|
156071
156071
|
reverseKeywords[cssKeywords[key2]] = key2;
|
156072
156072
|
}
|
156073
|
-
var
|
156073
|
+
var convert6 = {
|
156074
156074
|
rgb: { channels: 3, labels: "rgb" },
|
156075
156075
|
hsl: { channels: 3, labels: "hsl" },
|
156076
156076
|
hsv: { channels: 3, labels: "hsv" },
|
@@ -156087,24 +156087,24 @@ var require_conversions2 = __commonJS({
|
|
156087
156087
|
apple: { channels: 3, labels: ["r16", "g16", "b16"] },
|
156088
156088
|
gray: { channels: 1, labels: ["gray"] }
|
156089
156089
|
};
|
156090
|
-
module2.exports =
|
156091
|
-
for (const model of Object.keys(
|
156092
|
-
if (!("channels" in
|
156090
|
+
module2.exports = convert6;
|
156091
|
+
for (const model of Object.keys(convert6)) {
|
156092
|
+
if (!("channels" in convert6[model])) {
|
156093
156093
|
throw new Error("missing channels property: " + model);
|
156094
156094
|
}
|
156095
|
-
if (!("labels" in
|
156095
|
+
if (!("labels" in convert6[model])) {
|
156096
156096
|
throw new Error("missing channel labels property: " + model);
|
156097
156097
|
}
|
156098
|
-
if (
|
156098
|
+
if (convert6[model].labels.length !== convert6[model].channels) {
|
156099
156099
|
throw new Error("channel and label counts mismatch: " + model);
|
156100
156100
|
}
|
156101
|
-
const { channels, labels } =
|
156102
|
-
delete
|
156103
|
-
delete
|
156104
|
-
Object.defineProperty(
|
156105
|
-
Object.defineProperty(
|
156101
|
+
const { channels, labels } = convert6[model];
|
156102
|
+
delete convert6[model].channels;
|
156103
|
+
delete convert6[model].labels;
|
156104
|
+
Object.defineProperty(convert6[model], "channels", { value: channels });
|
156105
|
+
Object.defineProperty(convert6[model], "labels", { value: labels });
|
156106
156106
|
}
|
156107
|
-
|
156107
|
+
convert6.rgb.hsl = function(rgb) {
|
156108
156108
|
const r2 = rgb[0] / 255;
|
156109
156109
|
const g = rgb[1] / 255;
|
156110
156110
|
const b = rgb[2] / 255;
|
@@ -156136,7 +156136,7 @@ var require_conversions2 = __commonJS({
|
|
156136
156136
|
}
|
156137
156137
|
return [h4, s5 * 100, l * 100];
|
156138
156138
|
};
|
156139
|
-
|
156139
|
+
convert6.rgb.hsv = function(rgb) {
|
156140
156140
|
let rdif;
|
156141
156141
|
let gdif;
|
156142
156142
|
let bdif;
|
@@ -156177,16 +156177,16 @@ var require_conversions2 = __commonJS({
|
|
156177
156177
|
v * 100
|
156178
156178
|
];
|
156179
156179
|
};
|
156180
|
-
|
156180
|
+
convert6.rgb.hwb = function(rgb) {
|
156181
156181
|
const r2 = rgb[0];
|
156182
156182
|
const g = rgb[1];
|
156183
156183
|
let b = rgb[2];
|
156184
|
-
const h4 =
|
156184
|
+
const h4 = convert6.rgb.hsl(rgb)[0];
|
156185
156185
|
const w = 1 / 255 * Math.min(r2, Math.min(g, b));
|
156186
156186
|
b = 1 - 1 / 255 * Math.max(r2, Math.max(g, b));
|
156187
156187
|
return [h4, w * 100, b * 100];
|
156188
156188
|
};
|
156189
|
-
|
156189
|
+
convert6.rgb.cmyk = function(rgb) {
|
156190
156190
|
const r2 = rgb[0] / 255;
|
156191
156191
|
const g = rgb[1] / 255;
|
156192
156192
|
const b = rgb[2] / 255;
|
@@ -156199,7 +156199,7 @@ var require_conversions2 = __commonJS({
|
|
156199
156199
|
function comparativeDistance(x2, y) {
|
156200
156200
|
return (x2[0] - y[0]) ** 2 + (x2[1] - y[1]) ** 2 + (x2[2] - y[2]) ** 2;
|
156201
156201
|
}
|
156202
|
-
|
156202
|
+
convert6.rgb.keyword = function(rgb) {
|
156203
156203
|
const reversed = reverseKeywords[rgb];
|
156204
156204
|
if (reversed) {
|
156205
156205
|
return reversed;
|
@@ -156216,10 +156216,10 @@ var require_conversions2 = __commonJS({
|
|
156216
156216
|
}
|
156217
156217
|
return currentClosestKeyword;
|
156218
156218
|
};
|
156219
|
-
|
156219
|
+
convert6.keyword.rgb = function(keyword) {
|
156220
156220
|
return cssKeywords[keyword];
|
156221
156221
|
};
|
156222
|
-
|
156222
|
+
convert6.rgb.xyz = function(rgb) {
|
156223
156223
|
let r2 = rgb[0] / 255;
|
156224
156224
|
let g = rgb[1] / 255;
|
156225
156225
|
let b = rgb[2] / 255;
|
@@ -156231,8 +156231,8 @@ var require_conversions2 = __commonJS({
|
|
156231
156231
|
const z2 = r2 * 0.0193 + g * 0.1192 + b * 0.9505;
|
156232
156232
|
return [x2 * 100, y * 100, z2 * 100];
|
156233
156233
|
};
|
156234
|
-
|
156235
|
-
const xyz =
|
156234
|
+
convert6.rgb.lab = function(rgb) {
|
156235
|
+
const xyz = convert6.rgb.xyz(rgb);
|
156236
156236
|
let x2 = xyz[0];
|
156237
156237
|
let y = xyz[1];
|
156238
156238
|
let z2 = xyz[2];
|
@@ -156247,7 +156247,7 @@ var require_conversions2 = __commonJS({
|
|
156247
156247
|
const b = 200 * (y - z2);
|
156248
156248
|
return [l, a2, b];
|
156249
156249
|
};
|
156250
|
-
|
156250
|
+
convert6.hsl.rgb = function(hsl) {
|
156251
156251
|
const h4 = hsl[0] / 360;
|
156252
156252
|
const s5 = hsl[1] / 100;
|
156253
156253
|
const l = hsl[2] / 100;
|
@@ -156286,7 +156286,7 @@ var require_conversions2 = __commonJS({
|
|
156286
156286
|
}
|
156287
156287
|
return rgb;
|
156288
156288
|
};
|
156289
|
-
|
156289
|
+
convert6.hsl.hsv = function(hsl) {
|
156290
156290
|
const h4 = hsl[0];
|
156291
156291
|
let s5 = hsl[1] / 100;
|
156292
156292
|
let l = hsl[2] / 100;
|
@@ -156299,7 +156299,7 @@ var require_conversions2 = __commonJS({
|
|
156299
156299
|
const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s5 / (l + s5);
|
156300
156300
|
return [h4, sv * 100, v * 100];
|
156301
156301
|
};
|
156302
|
-
|
156302
|
+
convert6.hsv.rgb = function(hsv) {
|
156303
156303
|
const h4 = hsv[0] / 60;
|
156304
156304
|
const s5 = hsv[1] / 100;
|
156305
156305
|
let v = hsv[2] / 100;
|
@@ -156324,7 +156324,7 @@ var require_conversions2 = __commonJS({
|
|
156324
156324
|
return [v, p5, q2];
|
156325
156325
|
}
|
156326
156326
|
};
|
156327
|
-
|
156327
|
+
convert6.hsv.hsl = function(hsv) {
|
156328
156328
|
const h4 = hsv[0];
|
156329
156329
|
const s5 = hsv[1] / 100;
|
156330
156330
|
const v = hsv[2] / 100;
|
@@ -156339,7 +156339,7 @@ var require_conversions2 = __commonJS({
|
|
156339
156339
|
l /= 2;
|
156340
156340
|
return [h4, sl * 100, l * 100];
|
156341
156341
|
};
|
156342
|
-
|
156342
|
+
convert6.hwb.rgb = function(hwb) {
|
156343
156343
|
const h4 = hwb[0] / 360;
|
156344
156344
|
let wh = hwb[1] / 100;
|
156345
156345
|
let bl = hwb[2] / 100;
|
@@ -156395,7 +156395,7 @@ var require_conversions2 = __commonJS({
|
|
156395
156395
|
}
|
156396
156396
|
return [r2 * 255, g * 255, b * 255];
|
156397
156397
|
};
|
156398
|
-
|
156398
|
+
convert6.cmyk.rgb = function(cmyk) {
|
156399
156399
|
const c = cmyk[0] / 100;
|
156400
156400
|
const m2 = cmyk[1] / 100;
|
156401
156401
|
const y = cmyk[2] / 100;
|
@@ -156405,7 +156405,7 @@ var require_conversions2 = __commonJS({
|
|
156405
156405
|
const b = 1 - Math.min(1, y * (1 - k) + k);
|
156406
156406
|
return [r2 * 255, g * 255, b * 255];
|
156407
156407
|
};
|
156408
|
-
|
156408
|
+
convert6.xyz.rgb = function(xyz) {
|
156409
156409
|
const x2 = xyz[0] / 100;
|
156410
156410
|
const y = xyz[1] / 100;
|
156411
156411
|
const z2 = xyz[2] / 100;
|
@@ -156423,7 +156423,7 @@ var require_conversions2 = __commonJS({
|
|
156423
156423
|
b = Math.min(Math.max(0, b), 1);
|
156424
156424
|
return [r2 * 255, g * 255, b * 255];
|
156425
156425
|
};
|
156426
|
-
|
156426
|
+
convert6.xyz.lab = function(xyz) {
|
156427
156427
|
let x2 = xyz[0];
|
156428
156428
|
let y = xyz[1];
|
156429
156429
|
let z2 = xyz[2];
|
@@ -156438,7 +156438,7 @@ var require_conversions2 = __commonJS({
|
|
156438
156438
|
const b = 200 * (y - z2);
|
156439
156439
|
return [l, a2, b];
|
156440
156440
|
};
|
156441
|
-
|
156441
|
+
convert6.lab.xyz = function(lab) {
|
156442
156442
|
const l = lab[0];
|
156443
156443
|
const a2 = lab[1];
|
156444
156444
|
const b = lab[2];
|
@@ -156459,7 +156459,7 @@ var require_conversions2 = __commonJS({
|
|
156459
156459
|
z2 *= 108.883;
|
156460
156460
|
return [x2, y, z2];
|
156461
156461
|
};
|
156462
|
-
|
156462
|
+
convert6.lab.lch = function(lab) {
|
156463
156463
|
const l = lab[0];
|
156464
156464
|
const a2 = lab[1];
|
156465
156465
|
const b = lab[2];
|
@@ -156472,7 +156472,7 @@ var require_conversions2 = __commonJS({
|
|
156472
156472
|
const c = Math.sqrt(a2 * a2 + b * b);
|
156473
156473
|
return [l, c, h4];
|
156474
156474
|
};
|
156475
|
-
|
156475
|
+
convert6.lch.lab = function(lch) {
|
156476
156476
|
const l = lch[0];
|
156477
156477
|
const c = lch[1];
|
156478
156478
|
const h4 = lch[2];
|
@@ -156481,9 +156481,9 @@ var require_conversions2 = __commonJS({
|
|
156481
156481
|
const b = c * Math.sin(hr2);
|
156482
156482
|
return [l, a2, b];
|
156483
156483
|
};
|
156484
|
-
|
156484
|
+
convert6.rgb.ansi16 = function(args, saturation = null) {
|
156485
156485
|
const [r2, g, b] = args;
|
156486
|
-
let value = saturation === null ?
|
156486
|
+
let value = saturation === null ? convert6.rgb.hsv(args)[2] : saturation;
|
156487
156487
|
value = Math.round(value / 50);
|
156488
156488
|
if (value === 0) {
|
156489
156489
|
return 30;
|
@@ -156494,10 +156494,10 @@ var require_conversions2 = __commonJS({
|
|
156494
156494
|
}
|
156495
156495
|
return ansi;
|
156496
156496
|
};
|
156497
|
-
|
156498
|
-
return
|
156497
|
+
convert6.hsv.ansi16 = function(args) {
|
156498
|
+
return convert6.rgb.ansi16(convert6.hsv.rgb(args), args[2]);
|
156499
156499
|
};
|
156500
|
-
|
156500
|
+
convert6.rgb.ansi256 = function(args) {
|
156501
156501
|
const r2 = args[0];
|
156502
156502
|
const g = args[1];
|
156503
156503
|
const b = args[2];
|
@@ -156513,22 +156513,22 @@ var require_conversions2 = __commonJS({
|
|
156513
156513
|
const ansi = 16 + 36 * Math.round(r2 / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
|
156514
156514
|
return ansi;
|
156515
156515
|
};
|
156516
|
-
|
156517
|
-
let
|
156518
|
-
if (
|
156516
|
+
convert6.ansi16.rgb = function(args) {
|
156517
|
+
let color3 = args % 10;
|
156518
|
+
if (color3 === 0 || color3 === 7) {
|
156519
156519
|
if (args > 50) {
|
156520
|
-
|
156520
|
+
color3 += 3.5;
|
156521
156521
|
}
|
156522
|
-
|
156523
|
-
return [
|
156522
|
+
color3 = color3 / 10.5 * 255;
|
156523
|
+
return [color3, color3, color3];
|
156524
156524
|
}
|
156525
156525
|
const mult = (~~(args > 50) + 1) * 0.5;
|
156526
|
-
const r2 = (
|
156527
|
-
const g = (
|
156528
|
-
const b = (
|
156526
|
+
const r2 = (color3 & 1) * mult * 255;
|
156527
|
+
const g = (color3 >> 1 & 1) * mult * 255;
|
156528
|
+
const b = (color3 >> 2 & 1) * mult * 255;
|
156529
156529
|
return [r2, g, b];
|
156530
156530
|
};
|
156531
|
-
|
156531
|
+
convert6.ansi256.rgb = function(args) {
|
156532
156532
|
if (args >= 232) {
|
156533
156533
|
const c = (args - 232) * 10 + 8;
|
156534
156534
|
return [c, c, c];
|
@@ -156540,12 +156540,12 @@ var require_conversions2 = __commonJS({
|
|
156540
156540
|
const b = rem % 6 / 5 * 255;
|
156541
156541
|
return [r2, g, b];
|
156542
156542
|
};
|
156543
|
-
|
156543
|
+
convert6.rgb.hex = function(args) {
|
156544
156544
|
const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
|
156545
156545
|
const string2 = integer.toString(16).toUpperCase();
|
156546
156546
|
return "000000".substring(string2.length) + string2;
|
156547
156547
|
};
|
156548
|
-
|
156548
|
+
convert6.hex.rgb = function(args) {
|
156549
156549
|
const match3 = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
156550
156550
|
if (!match3) {
|
156551
156551
|
return [0, 0, 0];
|
@@ -156562,7 +156562,7 @@ var require_conversions2 = __commonJS({
|
|
156562
156562
|
const b = integer & 255;
|
156563
156563
|
return [r2, g, b];
|
156564
156564
|
};
|
156565
|
-
|
156565
|
+
convert6.rgb.hcg = function(rgb) {
|
156566
156566
|
const r2 = rgb[0] / 255;
|
156567
156567
|
const g = rgb[1] / 255;
|
156568
156568
|
const b = rgb[2] / 255;
|
@@ -156589,7 +156589,7 @@ var require_conversions2 = __commonJS({
|
|
156589
156589
|
hue %= 1;
|
156590
156590
|
return [hue * 360, chroma * 100, grayscale * 100];
|
156591
156591
|
};
|
156592
|
-
|
156592
|
+
convert6.hsl.hcg = function(hsl) {
|
156593
156593
|
const s5 = hsl[1] / 100;
|
156594
156594
|
const l = hsl[2] / 100;
|
156595
156595
|
const c = l < 0.5 ? 2 * s5 * l : 2 * s5 * (1 - l);
|
@@ -156599,7 +156599,7 @@ var require_conversions2 = __commonJS({
|
|
156599
156599
|
}
|
156600
156600
|
return [hsl[0], c * 100, f3 * 100];
|
156601
156601
|
};
|
156602
|
-
|
156602
|
+
convert6.hsv.hcg = function(hsv) {
|
156603
156603
|
const s5 = hsv[1] / 100;
|
156604
156604
|
const v = hsv[2] / 100;
|
156605
156605
|
const c = s5 * v;
|
@@ -156609,7 +156609,7 @@ var require_conversions2 = __commonJS({
|
|
156609
156609
|
}
|
156610
156610
|
return [hsv[0], c * 100, f3 * 100];
|
156611
156611
|
};
|
156612
|
-
|
156612
|
+
convert6.hcg.rgb = function(hcg) {
|
156613
156613
|
const h4 = hcg[0] / 360;
|
156614
156614
|
const c = hcg[1] / 100;
|
156615
156615
|
const g = hcg[2] / 100;
|
@@ -156659,7 +156659,7 @@ var require_conversions2 = __commonJS({
|
|
156659
156659
|
(c * pure[2] + mg) * 255
|
156660
156660
|
];
|
156661
156661
|
};
|
156662
|
-
|
156662
|
+
convert6.hcg.hsv = function(hcg) {
|
156663
156663
|
const c = hcg[1] / 100;
|
156664
156664
|
const g = hcg[2] / 100;
|
156665
156665
|
const v = c + g * (1 - c);
|
@@ -156669,7 +156669,7 @@ var require_conversions2 = __commonJS({
|
|
156669
156669
|
}
|
156670
156670
|
return [hcg[0], f3 * 100, v * 100];
|
156671
156671
|
};
|
156672
|
-
|
156672
|
+
convert6.hcg.hsl = function(hcg) {
|
156673
156673
|
const c = hcg[1] / 100;
|
156674
156674
|
const g = hcg[2] / 100;
|
156675
156675
|
const l = g * (1 - c) + 0.5 * c;
|
@@ -156681,13 +156681,13 @@ var require_conversions2 = __commonJS({
|
|
156681
156681
|
}
|
156682
156682
|
return [hcg[0], s5 * 100, l * 100];
|
156683
156683
|
};
|
156684
|
-
|
156684
|
+
convert6.hcg.hwb = function(hcg) {
|
156685
156685
|
const c = hcg[1] / 100;
|
156686
156686
|
const g = hcg[2] / 100;
|
156687
156687
|
const v = c + g * (1 - c);
|
156688
156688
|
return [hcg[0], (v - c) * 100, (1 - v) * 100];
|
156689
156689
|
};
|
156690
|
-
|
156690
|
+
convert6.hwb.hcg = function(hwb) {
|
156691
156691
|
const w = hwb[1] / 100;
|
156692
156692
|
const b = hwb[2] / 100;
|
156693
156693
|
const v = 1 - b;
|
@@ -156698,35 +156698,35 @@ var require_conversions2 = __commonJS({
|
|
156698
156698
|
}
|
156699
156699
|
return [hwb[0], c * 100, g * 100];
|
156700
156700
|
};
|
156701
|
-
|
156701
|
+
convert6.apple.rgb = function(apple) {
|
156702
156702
|
return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
|
156703
156703
|
};
|
156704
|
-
|
156704
|
+
convert6.rgb.apple = function(rgb) {
|
156705
156705
|
return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
|
156706
156706
|
};
|
156707
|
-
|
156707
|
+
convert6.gray.rgb = function(args) {
|
156708
156708
|
return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
|
156709
156709
|
};
|
156710
|
-
|
156710
|
+
convert6.gray.hsl = function(args) {
|
156711
156711
|
return [0, 0, args[0]];
|
156712
156712
|
};
|
156713
|
-
|
156714
|
-
|
156713
|
+
convert6.gray.hsv = convert6.gray.hsl;
|
156714
|
+
convert6.gray.hwb = function(gray) {
|
156715
156715
|
return [0, 100, gray[0]];
|
156716
156716
|
};
|
156717
|
-
|
156717
|
+
convert6.gray.cmyk = function(gray) {
|
156718
156718
|
return [0, 0, 0, gray[0]];
|
156719
156719
|
};
|
156720
|
-
|
156720
|
+
convert6.gray.lab = function(gray) {
|
156721
156721
|
return [gray[0], 0, 0];
|
156722
156722
|
};
|
156723
|
-
|
156723
|
+
convert6.gray.hex = function(gray) {
|
156724
156724
|
const val = Math.round(gray[0] / 100 * 255) & 255;
|
156725
156725
|
const integer = (val << 16) + (val << 8) + val;
|
156726
156726
|
const string2 = integer.toString(16).toUpperCase();
|
156727
156727
|
return "000000".substring(string2.length) + string2;
|
156728
156728
|
};
|
156729
|
-
|
156729
|
+
convert6.rgb.gray = function(rgb) {
|
156730
156730
|
const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
|
156731
156731
|
return [val / 255 * 100];
|
156732
156732
|
};
|
@@ -156808,7 +156808,7 @@ var require_color_convert2 = __commonJS({
|
|
156808
156808
|
"../../node_modules/inquirer/node_modules/color-convert/index.js"(exports2, module2) {
|
156809
156809
|
var conversions = require_conversions2();
|
156810
156810
|
var route = require_route3();
|
156811
|
-
var
|
156811
|
+
var convert6 = {};
|
156812
156812
|
var models = Object.keys(conversions);
|
156813
156813
|
function wrapRaw(fn) {
|
156814
156814
|
const wrappedFn = function(...args) {
|
@@ -156849,18 +156849,18 @@ var require_color_convert2 = __commonJS({
|
|
156849
156849
|
return wrappedFn;
|
156850
156850
|
}
|
156851
156851
|
models.forEach((fromModel) => {
|
156852
|
-
|
156853
|
-
Object.defineProperty(
|
156854
|
-
Object.defineProperty(
|
156852
|
+
convert6[fromModel] = {};
|
156853
|
+
Object.defineProperty(convert6[fromModel], "channels", { value: conversions[fromModel].channels });
|
156854
|
+
Object.defineProperty(convert6[fromModel], "labels", { value: conversions[fromModel].labels });
|
156855
156855
|
const routes = route(fromModel);
|
156856
156856
|
const routeModels = Object.keys(routes);
|
156857
156857
|
routeModels.forEach((toModel) => {
|
156858
156858
|
const fn = routes[toModel];
|
156859
|
-
|
156860
|
-
|
156859
|
+
convert6[fromModel][toModel] = wrapRounded(fn);
|
156860
|
+
convert6[fromModel][toModel].raw = wrapRaw(fn);
|
156861
156861
|
});
|
156862
156862
|
});
|
156863
|
-
module2.exports =
|
156863
|
+
module2.exports = convert6;
|
156864
156864
|
}
|
156865
156865
|
});
|
156866
156866
|
|
@@ -157304,7 +157304,7 @@ var require_conversions3 = __commonJS({
|
|
157304
157304
|
for (const key2 of Object.keys(cssKeywords)) {
|
157305
157305
|
reverseKeywords[cssKeywords[key2]] = key2;
|
157306
157306
|
}
|
157307
|
-
var
|
157307
|
+
var convert6 = {
|
157308
157308
|
rgb: { channels: 3, labels: "rgb" },
|
157309
157309
|
hsl: { channels: 3, labels: "hsl" },
|
157310
157310
|
hsv: { channels: 3, labels: "hsv" },
|
@@ -157321,24 +157321,24 @@ var require_conversions3 = __commonJS({
|
|
157321
157321
|
apple: { channels: 3, labels: ["r16", "g16", "b16"] },
|
157322
157322
|
gray: { channels: 1, labels: ["gray"] }
|
157323
157323
|
};
|
157324
|
-
module2.exports =
|
157325
|
-
for (const model of Object.keys(
|
157326
|
-
if (!("channels" in
|
157324
|
+
module2.exports = convert6;
|
157325
|
+
for (const model of Object.keys(convert6)) {
|
157326
|
+
if (!("channels" in convert6[model])) {
|
157327
157327
|
throw new Error("missing channels property: " + model);
|
157328
157328
|
}
|
157329
|
-
if (!("labels" in
|
157329
|
+
if (!("labels" in convert6[model])) {
|
157330
157330
|
throw new Error("missing channel labels property: " + model);
|
157331
157331
|
}
|
157332
|
-
if (
|
157332
|
+
if (convert6[model].labels.length !== convert6[model].channels) {
|
157333
157333
|
throw new Error("channel and label counts mismatch: " + model);
|
157334
157334
|
}
|
157335
|
-
const { channels, labels } =
|
157336
|
-
delete
|
157337
|
-
delete
|
157338
|
-
Object.defineProperty(
|
157339
|
-
Object.defineProperty(
|
157335
|
+
const { channels, labels } = convert6[model];
|
157336
|
+
delete convert6[model].channels;
|
157337
|
+
delete convert6[model].labels;
|
157338
|
+
Object.defineProperty(convert6[model], "channels", { value: channels });
|
157339
|
+
Object.defineProperty(convert6[model], "labels", { value: labels });
|
157340
157340
|
}
|
157341
|
-
|
157341
|
+
convert6.rgb.hsl = function(rgb) {
|
157342
157342
|
const r2 = rgb[0] / 255;
|
157343
157343
|
const g = rgb[1] / 255;
|
157344
157344
|
const b = rgb[2] / 255;
|
@@ -157370,7 +157370,7 @@ var require_conversions3 = __commonJS({
|
|
157370
157370
|
}
|
157371
157371
|
return [h4, s5 * 100, l * 100];
|
157372
157372
|
};
|
157373
|
-
|
157373
|
+
convert6.rgb.hsv = function(rgb) {
|
157374
157374
|
let rdif;
|
157375
157375
|
let gdif;
|
157376
157376
|
let bdif;
|
@@ -157411,16 +157411,16 @@ var require_conversions3 = __commonJS({
|
|
157411
157411
|
v * 100
|
157412
157412
|
];
|
157413
157413
|
};
|
157414
|
-
|
157414
|
+
convert6.rgb.hwb = function(rgb) {
|
157415
157415
|
const r2 = rgb[0];
|
157416
157416
|
const g = rgb[1];
|
157417
157417
|
let b = rgb[2];
|
157418
|
-
const h4 =
|
157418
|
+
const h4 = convert6.rgb.hsl(rgb)[0];
|
157419
157419
|
const w = 1 / 255 * Math.min(r2, Math.min(g, b));
|
157420
157420
|
b = 1 - 1 / 255 * Math.max(r2, Math.max(g, b));
|
157421
157421
|
return [h4, w * 100, b * 100];
|
157422
157422
|
};
|
157423
|
-
|
157423
|
+
convert6.rgb.cmyk = function(rgb) {
|
157424
157424
|
const r2 = rgb[0] / 255;
|
157425
157425
|
const g = rgb[1] / 255;
|
157426
157426
|
const b = rgb[2] / 255;
|
@@ -157433,7 +157433,7 @@ var require_conversions3 = __commonJS({
|
|
157433
157433
|
function comparativeDistance(x2, y) {
|
157434
157434
|
return (x2[0] - y[0]) ** 2 + (x2[1] - y[1]) ** 2 + (x2[2] - y[2]) ** 2;
|
157435
157435
|
}
|
157436
|
-
|
157436
|
+
convert6.rgb.keyword = function(rgb) {
|
157437
157437
|
const reversed = reverseKeywords[rgb];
|
157438
157438
|
if (reversed) {
|
157439
157439
|
return reversed;
|
@@ -157450,10 +157450,10 @@ var require_conversions3 = __commonJS({
|
|
157450
157450
|
}
|
157451
157451
|
return currentClosestKeyword;
|
157452
157452
|
};
|
157453
|
-
|
157453
|
+
convert6.keyword.rgb = function(keyword) {
|
157454
157454
|
return cssKeywords[keyword];
|
157455
157455
|
};
|
157456
|
-
|
157456
|
+
convert6.rgb.xyz = function(rgb) {
|
157457
157457
|
let r2 = rgb[0] / 255;
|
157458
157458
|
let g = rgb[1] / 255;
|
157459
157459
|
let b = rgb[2] / 255;
|
@@ -157465,8 +157465,8 @@ var require_conversions3 = __commonJS({
|
|
157465
157465
|
const z2 = r2 * 0.0193 + g * 0.1192 + b * 0.9505;
|
157466
157466
|
return [x2 * 100, y * 100, z2 * 100];
|
157467
157467
|
};
|
157468
|
-
|
157469
|
-
const xyz =
|
157468
|
+
convert6.rgb.lab = function(rgb) {
|
157469
|
+
const xyz = convert6.rgb.xyz(rgb);
|
157470
157470
|
let x2 = xyz[0];
|
157471
157471
|
let y = xyz[1];
|
157472
157472
|
let z2 = xyz[2];
|
@@ -157481,7 +157481,7 @@ var require_conversions3 = __commonJS({
|
|
157481
157481
|
const b = 200 * (y - z2);
|
157482
157482
|
return [l, a2, b];
|
157483
157483
|
};
|
157484
|
-
|
157484
|
+
convert6.hsl.rgb = function(hsl) {
|
157485
157485
|
const h4 = hsl[0] / 360;
|
157486
157486
|
const s5 = hsl[1] / 100;
|
157487
157487
|
const l = hsl[2] / 100;
|
@@ -157520,7 +157520,7 @@ var require_conversions3 = __commonJS({
|
|
157520
157520
|
}
|
157521
157521
|
return rgb;
|
157522
157522
|
};
|
157523
|
-
|
157523
|
+
convert6.hsl.hsv = function(hsl) {
|
157524
157524
|
const h4 = hsl[0];
|
157525
157525
|
let s5 = hsl[1] / 100;
|
157526
157526
|
let l = hsl[2] / 100;
|
@@ -157533,7 +157533,7 @@ var require_conversions3 = __commonJS({
|
|
157533
157533
|
const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s5 / (l + s5);
|
157534
157534
|
return [h4, sv * 100, v * 100];
|
157535
157535
|
};
|
157536
|
-
|
157536
|
+
convert6.hsv.rgb = function(hsv) {
|
157537
157537
|
const h4 = hsv[0] / 60;
|
157538
157538
|
const s5 = hsv[1] / 100;
|
157539
157539
|
let v = hsv[2] / 100;
|
@@ -157558,7 +157558,7 @@ var require_conversions3 = __commonJS({
|
|
157558
157558
|
return [v, p5, q2];
|
157559
157559
|
}
|
157560
157560
|
};
|
157561
|
-
|
157561
|
+
convert6.hsv.hsl = function(hsv) {
|
157562
157562
|
const h4 = hsv[0];
|
157563
157563
|
const s5 = hsv[1] / 100;
|
157564
157564
|
const v = hsv[2] / 100;
|
@@ -157573,7 +157573,7 @@ var require_conversions3 = __commonJS({
|
|
157573
157573
|
l /= 2;
|
157574
157574
|
return [h4, sl * 100, l * 100];
|
157575
157575
|
};
|
157576
|
-
|
157576
|
+
convert6.hwb.rgb = function(hwb) {
|
157577
157577
|
const h4 = hwb[0] / 360;
|
157578
157578
|
let wh = hwb[1] / 100;
|
157579
157579
|
let bl = hwb[2] / 100;
|
@@ -157629,7 +157629,7 @@ var require_conversions3 = __commonJS({
|
|
157629
157629
|
}
|
157630
157630
|
return [r2 * 255, g * 255, b * 255];
|
157631
157631
|
};
|
157632
|
-
|
157632
|
+
convert6.cmyk.rgb = function(cmyk) {
|
157633
157633
|
const c = cmyk[0] / 100;
|
157634
157634
|
const m2 = cmyk[1] / 100;
|
157635
157635
|
const y = cmyk[2] / 100;
|
@@ -157639,7 +157639,7 @@ var require_conversions3 = __commonJS({
|
|
157639
157639
|
const b = 1 - Math.min(1, y * (1 - k) + k);
|
157640
157640
|
return [r2 * 255, g * 255, b * 255];
|
157641
157641
|
};
|
157642
|
-
|
157642
|
+
convert6.xyz.rgb = function(xyz) {
|
157643
157643
|
const x2 = xyz[0] / 100;
|
157644
157644
|
const y = xyz[1] / 100;
|
157645
157645
|
const z2 = xyz[2] / 100;
|
@@ -157657,7 +157657,7 @@ var require_conversions3 = __commonJS({
|
|
157657
157657
|
b = Math.min(Math.max(0, b), 1);
|
157658
157658
|
return [r2 * 255, g * 255, b * 255];
|
157659
157659
|
};
|
157660
|
-
|
157660
|
+
convert6.xyz.lab = function(xyz) {
|
157661
157661
|
let x2 = xyz[0];
|
157662
157662
|
let y = xyz[1];
|
157663
157663
|
let z2 = xyz[2];
|
@@ -157672,7 +157672,7 @@ var require_conversions3 = __commonJS({
|
|
157672
157672
|
const b = 200 * (y - z2);
|
157673
157673
|
return [l, a2, b];
|
157674
157674
|
};
|
157675
|
-
|
157675
|
+
convert6.lab.xyz = function(lab) {
|
157676
157676
|
const l = lab[0];
|
157677
157677
|
const a2 = lab[1];
|
157678
157678
|
const b = lab[2];
|
@@ -157693,7 +157693,7 @@ var require_conversions3 = __commonJS({
|
|
157693
157693
|
z2 *= 108.883;
|
157694
157694
|
return [x2, y, z2];
|
157695
157695
|
};
|
157696
|
-
|
157696
|
+
convert6.lab.lch = function(lab) {
|
157697
157697
|
const l = lab[0];
|
157698
157698
|
const a2 = lab[1];
|
157699
157699
|
const b = lab[2];
|
@@ -157706,7 +157706,7 @@ var require_conversions3 = __commonJS({
|
|
157706
157706
|
const c = Math.sqrt(a2 * a2 + b * b);
|
157707
157707
|
return [l, c, h4];
|
157708
157708
|
};
|
157709
|
-
|
157709
|
+
convert6.lch.lab = function(lch) {
|
157710
157710
|
const l = lch[0];
|
157711
157711
|
const c = lch[1];
|
157712
157712
|
const h4 = lch[2];
|
@@ -157715,9 +157715,9 @@ var require_conversions3 = __commonJS({
|
|
157715
157715
|
const b = c * Math.sin(hr2);
|
157716
157716
|
return [l, a2, b];
|
157717
157717
|
};
|
157718
|
-
|
157718
|
+
convert6.rgb.ansi16 = function(args, saturation = null) {
|
157719
157719
|
const [r2, g, b] = args;
|
157720
|
-
let value = saturation === null ?
|
157720
|
+
let value = saturation === null ? convert6.rgb.hsv(args)[2] : saturation;
|
157721
157721
|
value = Math.round(value / 50);
|
157722
157722
|
if (value === 0) {
|
157723
157723
|
return 30;
|
@@ -157728,10 +157728,10 @@ var require_conversions3 = __commonJS({
|
|
157728
157728
|
}
|
157729
157729
|
return ansi;
|
157730
157730
|
};
|
157731
|
-
|
157732
|
-
return
|
157731
|
+
convert6.hsv.ansi16 = function(args) {
|
157732
|
+
return convert6.rgb.ansi16(convert6.hsv.rgb(args), args[2]);
|
157733
157733
|
};
|
157734
|
-
|
157734
|
+
convert6.rgb.ansi256 = function(args) {
|
157735
157735
|
const r2 = args[0];
|
157736
157736
|
const g = args[1];
|
157737
157737
|
const b = args[2];
|
@@ -157747,22 +157747,22 @@ var require_conversions3 = __commonJS({
|
|
157747
157747
|
const ansi = 16 + 36 * Math.round(r2 / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
|
157748
157748
|
return ansi;
|
157749
157749
|
};
|
157750
|
-
|
157751
|
-
let
|
157752
|
-
if (
|
157750
|
+
convert6.ansi16.rgb = function(args) {
|
157751
|
+
let color3 = args % 10;
|
157752
|
+
if (color3 === 0 || color3 === 7) {
|
157753
157753
|
if (args > 50) {
|
157754
|
-
|
157754
|
+
color3 += 3.5;
|
157755
157755
|
}
|
157756
|
-
|
157757
|
-
return [
|
157756
|
+
color3 = color3 / 10.5 * 255;
|
157757
|
+
return [color3, color3, color3];
|
157758
157758
|
}
|
157759
157759
|
const mult = (~~(args > 50) + 1) * 0.5;
|
157760
|
-
const r2 = (
|
157761
|
-
const g = (
|
157762
|
-
const b = (
|
157760
|
+
const r2 = (color3 & 1) * mult * 255;
|
157761
|
+
const g = (color3 >> 1 & 1) * mult * 255;
|
157762
|
+
const b = (color3 >> 2 & 1) * mult * 255;
|
157763
157763
|
return [r2, g, b];
|
157764
157764
|
};
|
157765
|
-
|
157765
|
+
convert6.ansi256.rgb = function(args) {
|
157766
157766
|
if (args >= 232) {
|
157767
157767
|
const c = (args - 232) * 10 + 8;
|
157768
157768
|
return [c, c, c];
|
@@ -157774,12 +157774,12 @@ var require_conversions3 = __commonJS({
|
|
157774
157774
|
const b = rem % 6 / 5 * 255;
|
157775
157775
|
return [r2, g, b];
|
157776
157776
|
};
|
157777
|
-
|
157777
|
+
convert6.rgb.hex = function(args) {
|
157778
157778
|
const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
|
157779
157779
|
const string2 = integer.toString(16).toUpperCase();
|
157780
157780
|
return "000000".substring(string2.length) + string2;
|
157781
157781
|
};
|
157782
|
-
|
157782
|
+
convert6.hex.rgb = function(args) {
|
157783
157783
|
const match3 = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
157784
157784
|
if (!match3) {
|
157785
157785
|
return [0, 0, 0];
|
@@ -157796,7 +157796,7 @@ var require_conversions3 = __commonJS({
|
|
157796
157796
|
const b = integer & 255;
|
157797
157797
|
return [r2, g, b];
|
157798
157798
|
};
|
157799
|
-
|
157799
|
+
convert6.rgb.hcg = function(rgb) {
|
157800
157800
|
const r2 = rgb[0] / 255;
|
157801
157801
|
const g = rgb[1] / 255;
|
157802
157802
|
const b = rgb[2] / 255;
|
@@ -157823,7 +157823,7 @@ var require_conversions3 = __commonJS({
|
|
157823
157823
|
hue %= 1;
|
157824
157824
|
return [hue * 360, chroma * 100, grayscale * 100];
|
157825
157825
|
};
|
157826
|
-
|
157826
|
+
convert6.hsl.hcg = function(hsl) {
|
157827
157827
|
const s5 = hsl[1] / 100;
|
157828
157828
|
const l = hsl[2] / 100;
|
157829
157829
|
const c = l < 0.5 ? 2 * s5 * l : 2 * s5 * (1 - l);
|
@@ -157833,7 +157833,7 @@ var require_conversions3 = __commonJS({
|
|
157833
157833
|
}
|
157834
157834
|
return [hsl[0], c * 100, f3 * 100];
|
157835
157835
|
};
|
157836
|
-
|
157836
|
+
convert6.hsv.hcg = function(hsv) {
|
157837
157837
|
const s5 = hsv[1] / 100;
|
157838
157838
|
const v = hsv[2] / 100;
|
157839
157839
|
const c = s5 * v;
|
@@ -157843,7 +157843,7 @@ var require_conversions3 = __commonJS({
|
|
157843
157843
|
}
|
157844
157844
|
return [hsv[0], c * 100, f3 * 100];
|
157845
157845
|
};
|
157846
|
-
|
157846
|
+
convert6.hcg.rgb = function(hcg) {
|
157847
157847
|
const h4 = hcg[0] / 360;
|
157848
157848
|
const c = hcg[1] / 100;
|
157849
157849
|
const g = hcg[2] / 100;
|
@@ -157893,7 +157893,7 @@ var require_conversions3 = __commonJS({
|
|
157893
157893
|
(c * pure[2] + mg) * 255
|
157894
157894
|
];
|
157895
157895
|
};
|
157896
|
-
|
157896
|
+
convert6.hcg.hsv = function(hcg) {
|
157897
157897
|
const c = hcg[1] / 100;
|
157898
157898
|
const g = hcg[2] / 100;
|
157899
157899
|
const v = c + g * (1 - c);
|
@@ -157903,7 +157903,7 @@ var require_conversions3 = __commonJS({
|
|
157903
157903
|
}
|
157904
157904
|
return [hcg[0], f3 * 100, v * 100];
|
157905
157905
|
};
|
157906
|
-
|
157906
|
+
convert6.hcg.hsl = function(hcg) {
|
157907
157907
|
const c = hcg[1] / 100;
|
157908
157908
|
const g = hcg[2] / 100;
|
157909
157909
|
const l = g * (1 - c) + 0.5 * c;
|
@@ -157915,13 +157915,13 @@ var require_conversions3 = __commonJS({
|
|
157915
157915
|
}
|
157916
157916
|
return [hcg[0], s5 * 100, l * 100];
|
157917
157917
|
};
|
157918
|
-
|
157918
|
+
convert6.hcg.hwb = function(hcg) {
|
157919
157919
|
const c = hcg[1] / 100;
|
157920
157920
|
const g = hcg[2] / 100;
|
157921
157921
|
const v = c + g * (1 - c);
|
157922
157922
|
return [hcg[0], (v - c) * 100, (1 - v) * 100];
|
157923
157923
|
};
|
157924
|
-
|
157924
|
+
convert6.hwb.hcg = function(hwb) {
|
157925
157925
|
const w = hwb[1] / 100;
|
157926
157926
|
const b = hwb[2] / 100;
|
157927
157927
|
const v = 1 - b;
|
@@ -157932,35 +157932,35 @@ var require_conversions3 = __commonJS({
|
|
157932
157932
|
}
|
157933
157933
|
return [hwb[0], c * 100, g * 100];
|
157934
157934
|
};
|
157935
|
-
|
157935
|
+
convert6.apple.rgb = function(apple) {
|
157936
157936
|
return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
|
157937
157937
|
};
|
157938
|
-
|
157938
|
+
convert6.rgb.apple = function(rgb) {
|
157939
157939
|
return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
|
157940
157940
|
};
|
157941
|
-
|
157941
|
+
convert6.gray.rgb = function(args) {
|
157942
157942
|
return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
|
157943
157943
|
};
|
157944
|
-
|
157944
|
+
convert6.gray.hsl = function(args) {
|
157945
157945
|
return [0, 0, args[0]];
|
157946
157946
|
};
|
157947
|
-
|
157948
|
-
|
157947
|
+
convert6.gray.hsv = convert6.gray.hsl;
|
157948
|
+
convert6.gray.hwb = function(gray) {
|
157949
157949
|
return [0, 100, gray[0]];
|
157950
157950
|
};
|
157951
|
-
|
157951
|
+
convert6.gray.cmyk = function(gray) {
|
157952
157952
|
return [0, 0, 0, gray[0]];
|
157953
157953
|
};
|
157954
|
-
|
157954
|
+
convert6.gray.lab = function(gray) {
|
157955
157955
|
return [gray[0], 0, 0];
|
157956
157956
|
};
|
157957
|
-
|
157957
|
+
convert6.gray.hex = function(gray) {
|
157958
157958
|
const val = Math.round(gray[0] / 100 * 255) & 255;
|
157959
157959
|
const integer = (val << 16) + (val << 8) + val;
|
157960
157960
|
const string2 = integer.toString(16).toUpperCase();
|
157961
157961
|
return "000000".substring(string2.length) + string2;
|
157962
157962
|
};
|
157963
|
-
|
157963
|
+
convert6.rgb.gray = function(rgb) {
|
157964
157964
|
const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
|
157965
157965
|
return [val / 255 * 100];
|
157966
157966
|
};
|
@@ -158042,7 +158042,7 @@ var require_color_convert3 = __commonJS({
|
|
158042
158042
|
"../../node_modules/ora/node_modules/color-convert/index.js"(exports2, module2) {
|
158043
158043
|
var conversions = require_conversions3();
|
158044
158044
|
var route = require_route4();
|
158045
|
-
var
|
158045
|
+
var convert6 = {};
|
158046
158046
|
var models = Object.keys(conversions);
|
158047
158047
|
function wrapRaw(fn) {
|
158048
158048
|
const wrappedFn = function(...args) {
|
@@ -158083,18 +158083,18 @@ var require_color_convert3 = __commonJS({
|
|
158083
158083
|
return wrappedFn;
|
158084
158084
|
}
|
158085
158085
|
models.forEach((fromModel) => {
|
158086
|
-
|
158087
|
-
Object.defineProperty(
|
158088
|
-
Object.defineProperty(
|
158086
|
+
convert6[fromModel] = {};
|
158087
|
+
Object.defineProperty(convert6[fromModel], "channels", { value: conversions[fromModel].channels });
|
158088
|
+
Object.defineProperty(convert6[fromModel], "labels", { value: conversions[fromModel].labels });
|
158089
158089
|
const routes = route(fromModel);
|
158090
158090
|
const routeModels = Object.keys(routes);
|
158091
158091
|
routeModels.forEach((toModel) => {
|
158092
158092
|
const fn = routes[toModel];
|
158093
|
-
|
158094
|
-
|
158093
|
+
convert6[fromModel][toModel] = wrapRounded(fn);
|
158094
|
+
convert6[fromModel][toModel].raw = wrapRaw(fn);
|
158095
158095
|
});
|
158096
158096
|
});
|
158097
|
-
module2.exports =
|
158097
|
+
module2.exports = convert6;
|
158098
158098
|
}
|
158099
158099
|
});
|
158100
158100
|
|
@@ -160495,7 +160495,7 @@ var require_conversions4 = __commonJS({
|
|
160495
160495
|
for (const key2 of Object.keys(cssKeywords)) {
|
160496
160496
|
reverseKeywords[cssKeywords[key2]] = key2;
|
160497
160497
|
}
|
160498
|
-
var
|
160498
|
+
var convert6 = {
|
160499
160499
|
rgb: { channels: 3, labels: "rgb" },
|
160500
160500
|
hsl: { channels: 3, labels: "hsl" },
|
160501
160501
|
hsv: { channels: 3, labels: "hsv" },
|
@@ -160512,24 +160512,24 @@ var require_conversions4 = __commonJS({
|
|
160512
160512
|
apple: { channels: 3, labels: ["r16", "g16", "b16"] },
|
160513
160513
|
gray: { channels: 1, labels: ["gray"] }
|
160514
160514
|
};
|
160515
|
-
module2.exports =
|
160516
|
-
for (const model of Object.keys(
|
160517
|
-
if (!("channels" in
|
160515
|
+
module2.exports = convert6;
|
160516
|
+
for (const model of Object.keys(convert6)) {
|
160517
|
+
if (!("channels" in convert6[model])) {
|
160518
160518
|
throw new Error("missing channels property: " + model);
|
160519
160519
|
}
|
160520
|
-
if (!("labels" in
|
160520
|
+
if (!("labels" in convert6[model])) {
|
160521
160521
|
throw new Error("missing channel labels property: " + model);
|
160522
160522
|
}
|
160523
|
-
if (
|
160523
|
+
if (convert6[model].labels.length !== convert6[model].channels) {
|
160524
160524
|
throw new Error("channel and label counts mismatch: " + model);
|
160525
160525
|
}
|
160526
|
-
const { channels, labels } =
|
160527
|
-
delete
|
160528
|
-
delete
|
160529
|
-
Object.defineProperty(
|
160530
|
-
Object.defineProperty(
|
160526
|
+
const { channels, labels } = convert6[model];
|
160527
|
+
delete convert6[model].channels;
|
160528
|
+
delete convert6[model].labels;
|
160529
|
+
Object.defineProperty(convert6[model], "channels", { value: channels });
|
160530
|
+
Object.defineProperty(convert6[model], "labels", { value: labels });
|
160531
160531
|
}
|
160532
|
-
|
160532
|
+
convert6.rgb.hsl = function(rgb) {
|
160533
160533
|
const r2 = rgb[0] / 255;
|
160534
160534
|
const g = rgb[1] / 255;
|
160535
160535
|
const b = rgb[2] / 255;
|
@@ -160561,7 +160561,7 @@ var require_conversions4 = __commonJS({
|
|
160561
160561
|
}
|
160562
160562
|
return [h4, s5 * 100, l * 100];
|
160563
160563
|
};
|
160564
|
-
|
160564
|
+
convert6.rgb.hsv = function(rgb) {
|
160565
160565
|
let rdif;
|
160566
160566
|
let gdif;
|
160567
160567
|
let bdif;
|
@@ -160602,16 +160602,16 @@ var require_conversions4 = __commonJS({
|
|
160602
160602
|
v * 100
|
160603
160603
|
];
|
160604
160604
|
};
|
160605
|
-
|
160605
|
+
convert6.rgb.hwb = function(rgb) {
|
160606
160606
|
const r2 = rgb[0];
|
160607
160607
|
const g = rgb[1];
|
160608
160608
|
let b = rgb[2];
|
160609
|
-
const h4 =
|
160609
|
+
const h4 = convert6.rgb.hsl(rgb)[0];
|
160610
160610
|
const w = 1 / 255 * Math.min(r2, Math.min(g, b));
|
160611
160611
|
b = 1 - 1 / 255 * Math.max(r2, Math.max(g, b));
|
160612
160612
|
return [h4, w * 100, b * 100];
|
160613
160613
|
};
|
160614
|
-
|
160614
|
+
convert6.rgb.cmyk = function(rgb) {
|
160615
160615
|
const r2 = rgb[0] / 255;
|
160616
160616
|
const g = rgb[1] / 255;
|
160617
160617
|
const b = rgb[2] / 255;
|
@@ -160624,7 +160624,7 @@ var require_conversions4 = __commonJS({
|
|
160624
160624
|
function comparativeDistance(x2, y) {
|
160625
160625
|
return (x2[0] - y[0]) ** 2 + (x2[1] - y[1]) ** 2 + (x2[2] - y[2]) ** 2;
|
160626
160626
|
}
|
160627
|
-
|
160627
|
+
convert6.rgb.keyword = function(rgb) {
|
160628
160628
|
const reversed = reverseKeywords[rgb];
|
160629
160629
|
if (reversed) {
|
160630
160630
|
return reversed;
|
@@ -160641,10 +160641,10 @@ var require_conversions4 = __commonJS({
|
|
160641
160641
|
}
|
160642
160642
|
return currentClosestKeyword;
|
160643
160643
|
};
|
160644
|
-
|
160644
|
+
convert6.keyword.rgb = function(keyword) {
|
160645
160645
|
return cssKeywords[keyword];
|
160646
160646
|
};
|
160647
|
-
|
160647
|
+
convert6.rgb.xyz = function(rgb) {
|
160648
160648
|
let r2 = rgb[0] / 255;
|
160649
160649
|
let g = rgb[1] / 255;
|
160650
160650
|
let b = rgb[2] / 255;
|
@@ -160656,8 +160656,8 @@ var require_conversions4 = __commonJS({
|
|
160656
160656
|
const z2 = r2 * 0.0193 + g * 0.1192 + b * 0.9505;
|
160657
160657
|
return [x2 * 100, y * 100, z2 * 100];
|
160658
160658
|
};
|
160659
|
-
|
160660
|
-
const xyz =
|
160659
|
+
convert6.rgb.lab = function(rgb) {
|
160660
|
+
const xyz = convert6.rgb.xyz(rgb);
|
160661
160661
|
let x2 = xyz[0];
|
160662
160662
|
let y = xyz[1];
|
160663
160663
|
let z2 = xyz[2];
|
@@ -160672,7 +160672,7 @@ var require_conversions4 = __commonJS({
|
|
160672
160672
|
const b = 200 * (y - z2);
|
160673
160673
|
return [l, a2, b];
|
160674
160674
|
};
|
160675
|
-
|
160675
|
+
convert6.hsl.rgb = function(hsl) {
|
160676
160676
|
const h4 = hsl[0] / 360;
|
160677
160677
|
const s5 = hsl[1] / 100;
|
160678
160678
|
const l = hsl[2] / 100;
|
@@ -160711,7 +160711,7 @@ var require_conversions4 = __commonJS({
|
|
160711
160711
|
}
|
160712
160712
|
return rgb;
|
160713
160713
|
};
|
160714
|
-
|
160714
|
+
convert6.hsl.hsv = function(hsl) {
|
160715
160715
|
const h4 = hsl[0];
|
160716
160716
|
let s5 = hsl[1] / 100;
|
160717
160717
|
let l = hsl[2] / 100;
|
@@ -160724,7 +160724,7 @@ var require_conversions4 = __commonJS({
|
|
160724
160724
|
const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s5 / (l + s5);
|
160725
160725
|
return [h4, sv * 100, v * 100];
|
160726
160726
|
};
|
160727
|
-
|
160727
|
+
convert6.hsv.rgb = function(hsv) {
|
160728
160728
|
const h4 = hsv[0] / 60;
|
160729
160729
|
const s5 = hsv[1] / 100;
|
160730
160730
|
let v = hsv[2] / 100;
|
@@ -160749,7 +160749,7 @@ var require_conversions4 = __commonJS({
|
|
160749
160749
|
return [v, p5, q2];
|
160750
160750
|
}
|
160751
160751
|
};
|
160752
|
-
|
160752
|
+
convert6.hsv.hsl = function(hsv) {
|
160753
160753
|
const h4 = hsv[0];
|
160754
160754
|
const s5 = hsv[1] / 100;
|
160755
160755
|
const v = hsv[2] / 100;
|
@@ -160764,7 +160764,7 @@ var require_conversions4 = __commonJS({
|
|
160764
160764
|
l /= 2;
|
160765
160765
|
return [h4, sl * 100, l * 100];
|
160766
160766
|
};
|
160767
|
-
|
160767
|
+
convert6.hwb.rgb = function(hwb) {
|
160768
160768
|
const h4 = hwb[0] / 360;
|
160769
160769
|
let wh = hwb[1] / 100;
|
160770
160770
|
let bl = hwb[2] / 100;
|
@@ -160820,7 +160820,7 @@ var require_conversions4 = __commonJS({
|
|
160820
160820
|
}
|
160821
160821
|
return [r2 * 255, g * 255, b * 255];
|
160822
160822
|
};
|
160823
|
-
|
160823
|
+
convert6.cmyk.rgb = function(cmyk) {
|
160824
160824
|
const c = cmyk[0] / 100;
|
160825
160825
|
const m2 = cmyk[1] / 100;
|
160826
160826
|
const y = cmyk[2] / 100;
|
@@ -160830,7 +160830,7 @@ var require_conversions4 = __commonJS({
|
|
160830
160830
|
const b = 1 - Math.min(1, y * (1 - k) + k);
|
160831
160831
|
return [r2 * 255, g * 255, b * 255];
|
160832
160832
|
};
|
160833
|
-
|
160833
|
+
convert6.xyz.rgb = function(xyz) {
|
160834
160834
|
const x2 = xyz[0] / 100;
|
160835
160835
|
const y = xyz[1] / 100;
|
160836
160836
|
const z2 = xyz[2] / 100;
|
@@ -160848,7 +160848,7 @@ var require_conversions4 = __commonJS({
|
|
160848
160848
|
b = Math.min(Math.max(0, b), 1);
|
160849
160849
|
return [r2 * 255, g * 255, b * 255];
|
160850
160850
|
};
|
160851
|
-
|
160851
|
+
convert6.xyz.lab = function(xyz) {
|
160852
160852
|
let x2 = xyz[0];
|
160853
160853
|
let y = xyz[1];
|
160854
160854
|
let z2 = xyz[2];
|
@@ -160863,7 +160863,7 @@ var require_conversions4 = __commonJS({
|
|
160863
160863
|
const b = 200 * (y - z2);
|
160864
160864
|
return [l, a2, b];
|
160865
160865
|
};
|
160866
|
-
|
160866
|
+
convert6.lab.xyz = function(lab) {
|
160867
160867
|
const l = lab[0];
|
160868
160868
|
const a2 = lab[1];
|
160869
160869
|
const b = lab[2];
|
@@ -160884,7 +160884,7 @@ var require_conversions4 = __commonJS({
|
|
160884
160884
|
z2 *= 108.883;
|
160885
160885
|
return [x2, y, z2];
|
160886
160886
|
};
|
160887
|
-
|
160887
|
+
convert6.lab.lch = function(lab) {
|
160888
160888
|
const l = lab[0];
|
160889
160889
|
const a2 = lab[1];
|
160890
160890
|
const b = lab[2];
|
@@ -160897,7 +160897,7 @@ var require_conversions4 = __commonJS({
|
|
160897
160897
|
const c = Math.sqrt(a2 * a2 + b * b);
|
160898
160898
|
return [l, c, h4];
|
160899
160899
|
};
|
160900
|
-
|
160900
|
+
convert6.lch.lab = function(lch) {
|
160901
160901
|
const l = lch[0];
|
160902
160902
|
const c = lch[1];
|
160903
160903
|
const h4 = lch[2];
|
@@ -160906,9 +160906,9 @@ var require_conversions4 = __commonJS({
|
|
160906
160906
|
const b = c * Math.sin(hr2);
|
160907
160907
|
return [l, a2, b];
|
160908
160908
|
};
|
160909
|
-
|
160909
|
+
convert6.rgb.ansi16 = function(args, saturation = null) {
|
160910
160910
|
const [r2, g, b] = args;
|
160911
|
-
let value = saturation === null ?
|
160911
|
+
let value = saturation === null ? convert6.rgb.hsv(args)[2] : saturation;
|
160912
160912
|
value = Math.round(value / 50);
|
160913
160913
|
if (value === 0) {
|
160914
160914
|
return 30;
|
@@ -160919,10 +160919,10 @@ var require_conversions4 = __commonJS({
|
|
160919
160919
|
}
|
160920
160920
|
return ansi;
|
160921
160921
|
};
|
160922
|
-
|
160923
|
-
return
|
160922
|
+
convert6.hsv.ansi16 = function(args) {
|
160923
|
+
return convert6.rgb.ansi16(convert6.hsv.rgb(args), args[2]);
|
160924
160924
|
};
|
160925
|
-
|
160925
|
+
convert6.rgb.ansi256 = function(args) {
|
160926
160926
|
const r2 = args[0];
|
160927
160927
|
const g = args[1];
|
160928
160928
|
const b = args[2];
|
@@ -160938,22 +160938,22 @@ var require_conversions4 = __commonJS({
|
|
160938
160938
|
const ansi = 16 + 36 * Math.round(r2 / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
|
160939
160939
|
return ansi;
|
160940
160940
|
};
|
160941
|
-
|
160942
|
-
let
|
160943
|
-
if (
|
160941
|
+
convert6.ansi16.rgb = function(args) {
|
160942
|
+
let color3 = args % 10;
|
160943
|
+
if (color3 === 0 || color3 === 7) {
|
160944
160944
|
if (args > 50) {
|
160945
|
-
|
160945
|
+
color3 += 3.5;
|
160946
160946
|
}
|
160947
|
-
|
160948
|
-
return [
|
160947
|
+
color3 = color3 / 10.5 * 255;
|
160948
|
+
return [color3, color3, color3];
|
160949
160949
|
}
|
160950
160950
|
const mult = (~~(args > 50) + 1) * 0.5;
|
160951
|
-
const r2 = (
|
160952
|
-
const g = (
|
160953
|
-
const b = (
|
160951
|
+
const r2 = (color3 & 1) * mult * 255;
|
160952
|
+
const g = (color3 >> 1 & 1) * mult * 255;
|
160953
|
+
const b = (color3 >> 2 & 1) * mult * 255;
|
160954
160954
|
return [r2, g, b];
|
160955
160955
|
};
|
160956
|
-
|
160956
|
+
convert6.ansi256.rgb = function(args) {
|
160957
160957
|
if (args >= 232) {
|
160958
160958
|
const c = (args - 232) * 10 + 8;
|
160959
160959
|
return [c, c, c];
|
@@ -160965,12 +160965,12 @@ var require_conversions4 = __commonJS({
|
|
160965
160965
|
const b = rem % 6 / 5 * 255;
|
160966
160966
|
return [r2, g, b];
|
160967
160967
|
};
|
160968
|
-
|
160968
|
+
convert6.rgb.hex = function(args) {
|
160969
160969
|
const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
|
160970
160970
|
const string2 = integer.toString(16).toUpperCase();
|
160971
160971
|
return "000000".substring(string2.length) + string2;
|
160972
160972
|
};
|
160973
|
-
|
160973
|
+
convert6.hex.rgb = function(args) {
|
160974
160974
|
const match3 = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
160975
160975
|
if (!match3) {
|
160976
160976
|
return [0, 0, 0];
|
@@ -160987,7 +160987,7 @@ var require_conversions4 = __commonJS({
|
|
160987
160987
|
const b = integer & 255;
|
160988
160988
|
return [r2, g, b];
|
160989
160989
|
};
|
160990
|
-
|
160990
|
+
convert6.rgb.hcg = function(rgb) {
|
160991
160991
|
const r2 = rgb[0] / 255;
|
160992
160992
|
const g = rgb[1] / 255;
|
160993
160993
|
const b = rgb[2] / 255;
|
@@ -161014,7 +161014,7 @@ var require_conversions4 = __commonJS({
|
|
161014
161014
|
hue %= 1;
|
161015
161015
|
return [hue * 360, chroma * 100, grayscale * 100];
|
161016
161016
|
};
|
161017
|
-
|
161017
|
+
convert6.hsl.hcg = function(hsl) {
|
161018
161018
|
const s5 = hsl[1] / 100;
|
161019
161019
|
const l = hsl[2] / 100;
|
161020
161020
|
const c = l < 0.5 ? 2 * s5 * l : 2 * s5 * (1 - l);
|
@@ -161024,7 +161024,7 @@ var require_conversions4 = __commonJS({
|
|
161024
161024
|
}
|
161025
161025
|
return [hsl[0], c * 100, f3 * 100];
|
161026
161026
|
};
|
161027
|
-
|
161027
|
+
convert6.hsv.hcg = function(hsv) {
|
161028
161028
|
const s5 = hsv[1] / 100;
|
161029
161029
|
const v = hsv[2] / 100;
|
161030
161030
|
const c = s5 * v;
|
@@ -161034,7 +161034,7 @@ var require_conversions4 = __commonJS({
|
|
161034
161034
|
}
|
161035
161035
|
return [hsv[0], c * 100, f3 * 100];
|
161036
161036
|
};
|
161037
|
-
|
161037
|
+
convert6.hcg.rgb = function(hcg) {
|
161038
161038
|
const h4 = hcg[0] / 360;
|
161039
161039
|
const c = hcg[1] / 100;
|
161040
161040
|
const g = hcg[2] / 100;
|
@@ -161084,7 +161084,7 @@ var require_conversions4 = __commonJS({
|
|
161084
161084
|
(c * pure[2] + mg) * 255
|
161085
161085
|
];
|
161086
161086
|
};
|
161087
|
-
|
161087
|
+
convert6.hcg.hsv = function(hcg) {
|
161088
161088
|
const c = hcg[1] / 100;
|
161089
161089
|
const g = hcg[2] / 100;
|
161090
161090
|
const v = c + g * (1 - c);
|
@@ -161094,7 +161094,7 @@ var require_conversions4 = __commonJS({
|
|
161094
161094
|
}
|
161095
161095
|
return [hcg[0], f3 * 100, v * 100];
|
161096
161096
|
};
|
161097
|
-
|
161097
|
+
convert6.hcg.hsl = function(hcg) {
|
161098
161098
|
const c = hcg[1] / 100;
|
161099
161099
|
const g = hcg[2] / 100;
|
161100
161100
|
const l = g * (1 - c) + 0.5 * c;
|
@@ -161106,13 +161106,13 @@ var require_conversions4 = __commonJS({
|
|
161106
161106
|
}
|
161107
161107
|
return [hcg[0], s5 * 100, l * 100];
|
161108
161108
|
};
|
161109
|
-
|
161109
|
+
convert6.hcg.hwb = function(hcg) {
|
161110
161110
|
const c = hcg[1] / 100;
|
161111
161111
|
const g = hcg[2] / 100;
|
161112
161112
|
const v = c + g * (1 - c);
|
161113
161113
|
return [hcg[0], (v - c) * 100, (1 - v) * 100];
|
161114
161114
|
};
|
161115
|
-
|
161115
|
+
convert6.hwb.hcg = function(hwb) {
|
161116
161116
|
const w = hwb[1] / 100;
|
161117
161117
|
const b = hwb[2] / 100;
|
161118
161118
|
const v = 1 - b;
|
@@ -161123,35 +161123,35 @@ var require_conversions4 = __commonJS({
|
|
161123
161123
|
}
|
161124
161124
|
return [hwb[0], c * 100, g * 100];
|
161125
161125
|
};
|
161126
|
-
|
161126
|
+
convert6.apple.rgb = function(apple) {
|
161127
161127
|
return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
|
161128
161128
|
};
|
161129
|
-
|
161129
|
+
convert6.rgb.apple = function(rgb) {
|
161130
161130
|
return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
|
161131
161131
|
};
|
161132
|
-
|
161132
|
+
convert6.gray.rgb = function(args) {
|
161133
161133
|
return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
|
161134
161134
|
};
|
161135
|
-
|
161135
|
+
convert6.gray.hsl = function(args) {
|
161136
161136
|
return [0, 0, args[0]];
|
161137
161137
|
};
|
161138
|
-
|
161139
|
-
|
161138
|
+
convert6.gray.hsv = convert6.gray.hsl;
|
161139
|
+
convert6.gray.hwb = function(gray) {
|
161140
161140
|
return [0, 100, gray[0]];
|
161141
161141
|
};
|
161142
|
-
|
161142
|
+
convert6.gray.cmyk = function(gray) {
|
161143
161143
|
return [0, 0, 0, gray[0]];
|
161144
161144
|
};
|
161145
|
-
|
161145
|
+
convert6.gray.lab = function(gray) {
|
161146
161146
|
return [gray[0], 0, 0];
|
161147
161147
|
};
|
161148
|
-
|
161148
|
+
convert6.gray.hex = function(gray) {
|
161149
161149
|
const val = Math.round(gray[0] / 100 * 255) & 255;
|
161150
161150
|
const integer = (val << 16) + (val << 8) + val;
|
161151
161151
|
const string2 = integer.toString(16).toUpperCase();
|
161152
161152
|
return "000000".substring(string2.length) + string2;
|
161153
161153
|
};
|
161154
|
-
|
161154
|
+
convert6.rgb.gray = function(rgb) {
|
161155
161155
|
const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
|
161156
161156
|
return [val / 255 * 100];
|
161157
161157
|
};
|
@@ -161233,7 +161233,7 @@ var require_color_convert4 = __commonJS({
|
|
161233
161233
|
"../../node_modules/log-symbols/node_modules/color-convert/index.js"(exports2, module2) {
|
161234
161234
|
var conversions = require_conversions4();
|
161235
161235
|
var route = require_route5();
|
161236
|
-
var
|
161236
|
+
var convert6 = {};
|
161237
161237
|
var models = Object.keys(conversions);
|
161238
161238
|
function wrapRaw(fn) {
|
161239
161239
|
const wrappedFn = function(...args) {
|
@@ -161274,18 +161274,18 @@ var require_color_convert4 = __commonJS({
|
|
161274
161274
|
return wrappedFn;
|
161275
161275
|
}
|
161276
161276
|
models.forEach((fromModel) => {
|
161277
|
-
|
161278
|
-
Object.defineProperty(
|
161279
|
-
Object.defineProperty(
|
161277
|
+
convert6[fromModel] = {};
|
161278
|
+
Object.defineProperty(convert6[fromModel], "channels", { value: conversions[fromModel].channels });
|
161279
|
+
Object.defineProperty(convert6[fromModel], "labels", { value: conversions[fromModel].labels });
|
161280
161280
|
const routes = route(fromModel);
|
161281
161281
|
const routeModels = Object.keys(routes);
|
161282
161282
|
routeModels.forEach((toModel) => {
|
161283
161283
|
const fn = routes[toModel];
|
161284
|
-
|
161285
|
-
|
161284
|
+
convert6[fromModel][toModel] = wrapRounded(fn);
|
161285
|
+
convert6[fromModel][toModel].raw = wrapRaw(fn);
|
161286
161286
|
});
|
161287
161287
|
});
|
161288
|
-
module2.exports =
|
161288
|
+
module2.exports = convert6;
|
161289
161289
|
}
|
161290
161290
|
});
|
161291
161291
|
|
@@ -182439,7 +182439,7 @@ var require_dist6 = __commonJS({
|
|
182439
182439
|
yield* object;
|
182440
182440
|
}
|
182441
182441
|
}
|
182442
|
-
function*
|
182442
|
+
function* empty6() {
|
182443
182443
|
return;
|
182444
182444
|
}
|
182445
182445
|
function* enumerate(object, start = 0) {
|
@@ -182500,21 +182500,21 @@ var require_dist6 = __commonJS({
|
|
182500
182500
|
return result;
|
182501
182501
|
}
|
182502
182502
|
function minmax(object, fn) {
|
182503
|
-
let
|
182503
|
+
let empty7 = true;
|
182504
182504
|
let vmin;
|
182505
182505
|
let vmax;
|
182506
182506
|
for (const value of object) {
|
182507
|
-
if (
|
182507
|
+
if (empty7) {
|
182508
182508
|
vmin = value;
|
182509
182509
|
vmax = value;
|
182510
|
-
|
182510
|
+
empty7 = false;
|
182511
182511
|
} else if (fn(value, vmin) < 0) {
|
182512
182512
|
vmin = value;
|
182513
182513
|
} else if (fn(value, vmax) > 0) {
|
182514
182514
|
vmax = value;
|
182515
182515
|
}
|
182516
182516
|
}
|
182517
|
-
return
|
182517
|
+
return empty7 ? void 0 : [vmin, vmax];
|
182518
182518
|
}
|
182519
182519
|
function toArray2(object) {
|
182520
182520
|
return Array.from(object);
|
@@ -182641,7 +182641,7 @@ var require_dist6 = __commonJS({
|
|
182641
182641
|
addEdge(edge);
|
182642
182642
|
}
|
182643
182643
|
for (const [k] of graph) {
|
182644
|
-
|
182644
|
+
visit4(k);
|
182645
182645
|
}
|
182646
182646
|
return sorted;
|
182647
182647
|
function addEdge(edge) {
|
@@ -182653,7 +182653,7 @@ var require_dist6 = __commonJS({
|
|
182653
182653
|
graph.set(toNode3, [fromNode]);
|
182654
182654
|
}
|
182655
182655
|
}
|
182656
|
-
function
|
182656
|
+
function visit4(node3) {
|
182657
182657
|
if (visited.has(node3)) {
|
182658
182658
|
return;
|
182659
182659
|
}
|
@@ -182661,7 +182661,7 @@ var require_dist6 = __commonJS({
|
|
182661
182661
|
let children = graph.get(node3);
|
182662
182662
|
if (children) {
|
182663
182663
|
for (const child of children) {
|
182664
|
-
|
182664
|
+
visit4(child);
|
182665
182665
|
}
|
182666
182666
|
}
|
182667
182667
|
sorted.push(node3);
|
@@ -182766,7 +182766,7 @@ var require_dist6 = __commonJS({
|
|
182766
182766
|
}
|
182767
182767
|
exports3.chain = chain;
|
182768
182768
|
exports3.each = each2;
|
182769
|
-
exports3.empty =
|
182769
|
+
exports3.empty = empty6;
|
182770
182770
|
exports3.enumerate = enumerate;
|
182771
182771
|
exports3.every = every;
|
182772
182772
|
exports3.filter = filter7;
|
@@ -183322,8 +183322,8 @@ var require_dist7 = __commonJS({
|
|
183322
183322
|
const sendersForReceiver = /* @__PURE__ */ new WeakMap();
|
183323
183323
|
const dirtySet = /* @__PURE__ */ new Set();
|
183324
183324
|
const schedule = (() => {
|
183325
|
-
let
|
183326
|
-
return
|
183325
|
+
let ok4 = typeof requestAnimationFrame === "function";
|
183326
|
+
return ok4 ? requestAnimationFrame : setImmediate;
|
183327
183327
|
})();
|
183328
183328
|
function findConnection(connections, signal, slot, thisArg) {
|
183329
183329
|
return algorithm.find(connections, (connection) => connection.signal === signal && connection.slot === slot && connection.thisArg === thisArg);
|
@@ -188231,8 +188231,8 @@ var require_future = __commonJS({
|
|
188231
188231
|
Private2.noOp = () => {
|
188232
188232
|
};
|
188233
188233
|
const defer3 = (() => {
|
188234
|
-
const
|
188235
|
-
return
|
188234
|
+
const ok4 = typeof requestAnimationFrame === "function";
|
188235
|
+
return ok4 ? requestAnimationFrame : setImmediate;
|
188236
188236
|
})();
|
188237
188237
|
class HookList {
|
188238
188238
|
constructor() {
|
@@ -193562,7 +193562,7 @@ var {
|
|
193562
193562
|
} = import_index.default;
|
193563
193563
|
|
193564
193564
|
// src/version.ts
|
193565
|
-
var version = "1.3.
|
193565
|
+
var version = "1.3.10";
|
193566
193566
|
var version_default = version;
|
193567
193567
|
|
193568
193568
|
// ../myst-cli/dist/build/build.js
|
@@ -202916,14 +202916,14 @@ var remove = (
|
|
202916
202916
|
* @returns {Node | null}
|
202917
202917
|
*/
|
202918
202918
|
function(tree, options, test2) {
|
202919
|
-
const
|
202919
|
+
const is5 = convert(test2 || options);
|
202920
202920
|
const cascade = !options || options.cascade === void 0 || options.cascade === null ? true : options.cascade;
|
202921
202921
|
return preorder(tree);
|
202922
202922
|
function preorder(node3, index4, parent2) {
|
202923
202923
|
const children = node3.children || empty;
|
202924
202924
|
let childIndex = -1;
|
202925
202925
|
let position6 = 0;
|
202926
|
-
if (
|
202926
|
+
if (is5(node3, index4, parent2)) {
|
202927
202927
|
return null;
|
202928
202928
|
}
|
202929
202929
|
if (children.length > 0) {
|
@@ -203812,7 +203812,7 @@ var visitParents = (
|
|
203812
203812
|
visitor = test2;
|
203813
203813
|
test2 = null;
|
203814
203814
|
}
|
203815
|
-
const
|
203815
|
+
const is5 = convert(test2);
|
203816
203816
|
const step = reverse ? -1 : 1;
|
203817
203817
|
factory(tree, void 0, [])();
|
203818
203818
|
function factory(node3, index4, parents) {
|
@@ -203825,17 +203825,17 @@ var visitParents = (
|
|
203825
203825
|
typeof value.name === "string" ? value.name : void 0
|
203826
203826
|
)
|
203827
203827
|
);
|
203828
|
-
Object.defineProperty(
|
203828
|
+
Object.defineProperty(visit4, "name", {
|
203829
203829
|
value: "node (" + color(node3.type + (name3 ? "<" + name3 + ">" : "")) + ")"
|
203830
203830
|
});
|
203831
203831
|
}
|
203832
|
-
return
|
203833
|
-
function
|
203832
|
+
return visit4;
|
203833
|
+
function visit4() {
|
203834
203834
|
let result = [];
|
203835
203835
|
let subresult;
|
203836
203836
|
let offset;
|
203837
203837
|
let grandparents;
|
203838
|
-
if (!test2 ||
|
203838
|
+
if (!test2 || is5(node3, index4, parents[parents.length - 1] || null)) {
|
203839
203839
|
result = toResult(visitor(node3, parents));
|
203840
203840
|
if (result[0] === EXIT) {
|
203841
203841
|
return result;
|
@@ -209597,7 +209597,7 @@ var findAfter = (
|
|
209597
209597
|
* @returns {Node | null}
|
209598
209598
|
*/
|
209599
209599
|
function(parent2, index4, test2) {
|
209600
|
-
const
|
209600
|
+
const is5 = convert(test2);
|
209601
209601
|
if (!parent2 || !parent2.type || !parent2.children) {
|
209602
209602
|
throw new Error("Expected parent node");
|
209603
209603
|
}
|
@@ -209612,7 +209612,7 @@ var findAfter = (
|
|
209612
209612
|
}
|
209613
209613
|
}
|
209614
209614
|
while (++index4 < parent2.children.length) {
|
209615
|
-
if (
|
209615
|
+
if (is5(parent2.children[index4], index4, parent2)) {
|
209616
209616
|
return parent2.children[index4];
|
209617
209617
|
}
|
209618
209618
|
}
|
@@ -221952,7 +221952,7 @@ var SETTINGS_SCHEMA = {
|
|
221952
221952
|
default: "#cc0000",
|
221953
221953
|
cli: "-c, --error-color <color>",
|
221954
221954
|
cliDescription: "A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",
|
221955
|
-
cliProcessor: (
|
221955
|
+
cliProcessor: (color3) => "#" + color3
|
221956
221956
|
},
|
221957
221957
|
macros: {
|
221958
221958
|
type: "object",
|
@@ -224935,9 +224935,9 @@ var Options = class {
|
|
224935
224935
|
/**
|
224936
224936
|
* Create a new options object with the given color.
|
224937
224937
|
*/
|
224938
|
-
withColor(
|
224938
|
+
withColor(color3) {
|
224939
224939
|
return this.extend({
|
224940
|
-
color:
|
224940
|
+
color: color3
|
224941
224941
|
});
|
224942
224942
|
}
|
224943
224943
|
/**
|
@@ -225110,9 +225110,9 @@ var initNode = function initNode2(classes, options, style3) {
|
|
225110
225110
|
if (options.style.isTight()) {
|
225111
225111
|
this.classes.push("mtight");
|
225112
225112
|
}
|
225113
|
-
var
|
225114
|
-
if (
|
225115
|
-
this.style.color =
|
225113
|
+
var color3 = options.getColor();
|
225114
|
+
if (color3) {
|
225115
|
+
this.style.color = color3;
|
225116
225116
|
}
|
225117
225117
|
}
|
225118
225118
|
};
|
@@ -226324,9 +226324,9 @@ var makeSymbol = function makeSymbol2(value, fontName, mode, options, classes) {
|
|
226324
226324
|
if (options.style.isTight()) {
|
226325
226325
|
symbolNode.classes.push("mtight");
|
226326
226326
|
}
|
226327
|
-
var
|
226328
|
-
if (
|
226329
|
-
symbolNode.style.color =
|
226327
|
+
var color3 = options.getColor();
|
226328
|
+
if (color3) {
|
226329
|
+
symbolNode.style.color = color3;
|
226330
226330
|
}
|
226331
226331
|
}
|
226332
226332
|
return symbolNode;
|
@@ -227678,9 +227678,9 @@ var encloseSpan = function encloseSpan2(inner2, label, topPad, bottomPad, option
|
|
227678
227678
|
if (/fbox|color|angl/.test(label)) {
|
227679
227679
|
img2 = buildCommon.makeSpan(["stretchy", label], [], options);
|
227680
227680
|
if (label === "fbox") {
|
227681
|
-
var
|
227682
|
-
if (
|
227683
|
-
img2.style.borderColor =
|
227681
|
+
var color3 = options.color && options.getColor();
|
227682
|
+
if (color3) {
|
227683
|
+
img2.style.borderColor = color3;
|
227684
227684
|
}
|
227685
227685
|
}
|
227686
227686
|
} else {
|
@@ -228372,12 +228372,12 @@ defineFunction({
|
|
228372
228372
|
var {
|
228373
228373
|
parser: parser3
|
228374
228374
|
} = _ref;
|
228375
|
-
var
|
228375
|
+
var color3 = assertNodeType(args[0], "color-token").color;
|
228376
228376
|
var body3 = args[1];
|
228377
228377
|
return {
|
228378
228378
|
type: "color",
|
228379
228379
|
mode: parser3.mode,
|
228380
|
-
color:
|
228380
|
+
color: color3,
|
228381
228381
|
body: ordargument(body3)
|
228382
228382
|
};
|
228383
228383
|
},
|
@@ -228397,13 +228397,13 @@ defineFunction({
|
|
228397
228397
|
parser: parser3,
|
228398
228398
|
breakOnTokenText
|
228399
228399
|
} = _ref2;
|
228400
|
-
var
|
228401
|
-
parser3.gullet.macros.set("\\current@color",
|
228400
|
+
var color3 = assertNodeType(args[0], "color-token").color;
|
228401
|
+
parser3.gullet.macros.set("\\current@color", color3);
|
228402
228402
|
var body3 = parser3.parseExpression(true, breakOnTokenText);
|
228403
228403
|
return {
|
228404
228404
|
type: "color",
|
228405
228405
|
mode: parser3.mode,
|
228406
|
-
color:
|
228406
|
+
color: color3,
|
228407
228407
|
body: body3
|
228408
228408
|
};
|
228409
228409
|
},
|
@@ -229220,15 +229220,15 @@ defineFunction({
|
|
229220
229220
|
primitive: true
|
229221
229221
|
},
|
229222
229222
|
handler: (context, args) => {
|
229223
|
-
var
|
229224
|
-
if (
|
229223
|
+
var color3 = context.parser.gullet.macros.get("\\current@color");
|
229224
|
+
if (color3 && typeof color3 !== "string") {
|
229225
229225
|
throw new ParseError("\\current@color set to non-string in \\right");
|
229226
229226
|
}
|
229227
229227
|
return {
|
229228
229228
|
type: "leftright-right",
|
229229
229229
|
mode: context.parser.mode,
|
229230
229230
|
delim: checkDelimiter(args[0], context).text,
|
229231
|
-
color:
|
229231
|
+
color: color3
|
229232
229232
|
// undefined if not set via \color
|
229233
229233
|
};
|
229234
229234
|
}
|
@@ -229549,13 +229549,13 @@ defineFunction({
|
|
229549
229549
|
parser: parser3,
|
229550
229550
|
funcName
|
229551
229551
|
} = _ref;
|
229552
|
-
var
|
229552
|
+
var color3 = assertNodeType(args[0], "color-token").color;
|
229553
229553
|
var body3 = args[1];
|
229554
229554
|
return {
|
229555
229555
|
type: "enclose",
|
229556
229556
|
mode: parser3.mode,
|
229557
229557
|
label: funcName,
|
229558
|
-
backgroundColor:
|
229558
|
+
backgroundColor: color3,
|
229559
229559
|
body: body3
|
229560
229560
|
};
|
229561
229561
|
},
|
@@ -232637,9 +232637,9 @@ defineFunction({
|
|
232637
232637
|
var width = calculateSize(group3.width, options);
|
232638
232638
|
var height2 = calculateSize(group3.height, options);
|
232639
232639
|
var shift = group3.shift ? calculateSize(group3.shift, options) : 0;
|
232640
|
-
var
|
232640
|
+
var color3 = options.color && options.getColor() || "black";
|
232641
232641
|
var rule = new mathMLTree.MathNode("mspace");
|
232642
|
-
rule.setAttribute("mathbackground",
|
232642
|
+
rule.setAttribute("mathbackground", color3);
|
232643
232643
|
rule.setAttribute("width", makeEm(width));
|
232644
232644
|
rule.setAttribute("height", makeEm(height2));
|
232645
232645
|
var wrapper = new mathMLTree.MathNode("mpadded", [rule]);
|
@@ -235643,14 +235643,14 @@ var Parser2 = class {
|
|
235643
235643
|
if (!match3) {
|
235644
235644
|
throw new ParseError("Invalid color: '" + res.text + "'", res);
|
235645
235645
|
}
|
235646
|
-
var
|
235647
|
-
if (/^[0-9a-f]{6}$/i.test(
|
235648
|
-
|
235646
|
+
var color3 = match3[0];
|
235647
|
+
if (/^[0-9a-f]{6}$/i.test(color3)) {
|
235648
|
+
color3 = "#" + color3;
|
235649
235649
|
}
|
235650
235650
|
return {
|
235651
235651
|
type: "color-token",
|
235652
235652
|
mode: this.mode,
|
235653
|
-
color:
|
235653
|
+
color: color3
|
235654
235654
|
};
|
235655
235655
|
}
|
235656
235656
|
/**
|
@@ -241169,8 +241169,8 @@ var links = createSlice({
|
|
241169
241169
|
initialState: {},
|
241170
241170
|
reducers: {
|
241171
241171
|
updateLink(state, action) {
|
241172
|
-
const { url, ok:
|
241173
|
-
state[url] = { url, ok:
|
241172
|
+
const { url, ok: ok4, skipped, status, statusText } = action.payload;
|
241173
|
+
state[url] = { url, ok: ok4, skipped, status, statusText };
|
241174
241174
|
}
|
241175
241175
|
}
|
241176
241176
|
});
|
@@ -241881,11 +241881,12 @@ var InlineCite;
|
|
241881
241881
|
InlineCite2["t"] = "t";
|
241882
241882
|
})(InlineCite || (InlineCite = {}));
|
241883
241883
|
function yearFromCitation(data) {
|
241884
|
-
var _a6, _b, _c, _d2, _e
|
241885
|
-
|
241884
|
+
var _a6, _b, _c, _d2, _e;
|
241885
|
+
const date = (_a6 = data.issued) !== null && _a6 !== void 0 ? _a6 : data.accessed;
|
241886
|
+
let year = (_c = (_b = date === null || date === void 0 ? void 0 : date["date-parts"]) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c[0];
|
241886
241887
|
if (year)
|
241887
241888
|
return year;
|
241888
|
-
year = (
|
241889
|
+
year = (_e = (_d2 = date === null || date === void 0 ? void 0 : date["literal"]) === null || _d2 === void 0 ? void 0 : _d2.match(/\b[12][0-9]{3}\b/)) === null || _e === void 0 ? void 0 : _e[0];
|
241889
241890
|
if (year)
|
241890
241891
|
return year;
|
241891
241892
|
return "n.d.";
|
@@ -266466,9 +266467,9 @@ var require_standalone = __commonJS3({
|
|
266466
266467
|
var us = xe((B0, ns) => {
|
266467
266468
|
ns.exports = false;
|
266468
266469
|
});
|
266469
|
-
var dr = xe((N0,
|
266470
|
+
var dr = xe((N0, is5) => {
|
266470
266471
|
var ss = pt(), El = Object.defineProperty;
|
266471
|
-
|
266472
|
+
is5.exports = function(e2, r2) {
|
266472
266473
|
try {
|
266473
266474
|
El(ss, e2, { value: r2, configurable: true, writable: true });
|
266474
266475
|
} catch {
|
@@ -278285,14 +278286,14 @@ var colors = {
|
|
278285
278286
|
YellowGreen: "#98CC70",
|
278286
278287
|
YellowOrange: "#FAA21A"
|
278287
278288
|
};
|
278288
|
-
function convertLatexColor(state, node3, kind,
|
278289
|
+
function convertLatexColor(state, node3, kind, color3) {
|
278289
278290
|
var _a6;
|
278290
|
-
if (!kind || !
|
278291
|
+
if (!kind || !color3) {
|
278291
278292
|
const myColors = { ...colors, ...state.data.colors };
|
278292
|
-
const named = (_a6 = myColors[
|
278293
|
+
const named = (_a6 = myColors[color3]) !== null && _a6 !== void 0 ? _a6 : myColors[kind];
|
278293
278294
|
if (named)
|
278294
278295
|
return named;
|
278295
|
-
state.warn(`Color is not defined: "${
|
278296
|
+
state.warn(`Color is not defined: "${color3}"`, node3, "color", {
|
278296
278297
|
note: "Color names are case sensitive",
|
278297
278298
|
url: "https://en.wikibooks.org/wiki/LaTeX/Colors#Predefined_colors"
|
278298
278299
|
});
|
@@ -278301,10 +278302,10 @@ function convertLatexColor(state, node3, kind, color2) {
|
|
278301
278302
|
switch (kind) {
|
278302
278303
|
case "gray": {
|
278303
278304
|
let good = true;
|
278304
|
-
const gray = Math.floor(Number(
|
278305
|
+
const gray = Math.floor(Number(color3) * 255);
|
278305
278306
|
if (Number.isNaN(gray) || gray < 0 || gray > 255) {
|
278306
278307
|
good = false;
|
278307
|
-
state.warn(`Problem with gray color: ${
|
278308
|
+
state.warn(`Problem with gray color: ${color3}`, node3, "color", {
|
278308
278309
|
note: 'The value when using "gray" the value must be between 0 and 1.'
|
278309
278310
|
});
|
278310
278311
|
}
|
@@ -278312,7 +278313,7 @@ function convertLatexColor(state, node3, kind, color2) {
|
|
278312
278313
|
}
|
278313
278314
|
case "rgb": {
|
278314
278315
|
let good = true;
|
278315
|
-
const channels =
|
278316
|
+
const channels = color3.split(",");
|
278316
278317
|
if (channels.length !== 3) {
|
278317
278318
|
good = false;
|
278318
278319
|
state.warn(`The rgb color must define 3 channels.`, node3, "color", {
|
@@ -278331,7 +278332,7 @@ function convertLatexColor(state, node3, kind, color2) {
|
|
278331
278332
|
}
|
278332
278333
|
case "RGB": {
|
278333
278334
|
let good = true;
|
278334
|
-
const channels =
|
278335
|
+
const channels = color3.split(",");
|
278335
278336
|
if (channels.length !== 3) {
|
278336
278337
|
good = false;
|
278337
278338
|
state.warn(`The RGB color must define 3 channels.`, node3, "color", {
|
@@ -278350,17 +278351,17 @@ function convertLatexColor(state, node3, kind, color2) {
|
|
278350
278351
|
}
|
278351
278352
|
case "HTML": {
|
278352
278353
|
let good = true;
|
278353
|
-
if (!(
|
278354
|
+
if (!(color3.length === 3 || color3.length === 6 || !color3.match(/^([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/))) {
|
278354
278355
|
good = false;
|
278355
|
-
state.warn(`Problem with HTML color: ${
|
278356
|
+
state.warn(`Problem with HTML color: ${color3}`, node3, "color", {
|
278356
278357
|
note: 'The value when using "HTML" values must be either 3 or 6 hexadecimal (A-F, 0-9) characters.'
|
278357
278358
|
});
|
278358
278359
|
}
|
278359
|
-
return good ? `#${
|
278360
|
+
return good ? `#${color3.toUpperCase()}` : void 0;
|
278360
278361
|
}
|
278361
278362
|
case "cmky": {
|
278362
278363
|
let good = true;
|
278363
|
-
const channels =
|
278364
|
+
const channels = color3.split(",");
|
278364
278365
|
if (channels.length !== 4) {
|
278365
278366
|
good = false;
|
278366
278367
|
state.warn(`The cmky color must define 4 channels.`, node3, "color", {
|
@@ -278388,8 +278389,8 @@ var COLOR_HANDLERS = {
|
|
278388
278389
|
macro_color(node3, state) {
|
278389
278390
|
state.openParagraph();
|
278390
278391
|
const kind = texToText(getArguments(node3, "argument"));
|
278391
|
-
const
|
278392
|
-
const style3 = convertLatexColor(state, node3, kind,
|
278392
|
+
const color3 = texToText(getArguments(node3, "group"));
|
278393
|
+
const style3 = convertLatexColor(state, node3, kind, color3);
|
278393
278394
|
state.openNode("span", style3 ? { style: { color: style3 } } : void 0);
|
278394
278395
|
state.data.openGroups.push("span");
|
278395
278396
|
state.data.ignoreNextWhitespace = true;
|
@@ -278398,16 +278399,16 @@ var COLOR_HANDLERS = {
|
|
278398
278399
|
state.openParagraph();
|
278399
278400
|
const kind = texToText(getArguments(node3, "argument"));
|
278400
278401
|
const [colorNode, children] = getArguments(node3, "group");
|
278401
|
-
const
|
278402
|
-
const style3 = convertLatexColor(state, node3, kind,
|
278402
|
+
const color3 = texToText(colorNode);
|
278403
|
+
const style3 = convertLatexColor(state, node3, kind, color3);
|
278403
278404
|
state.renderInline(children, "span", style3 ? { style: { color: style3 } } : void 0);
|
278404
278405
|
},
|
278405
278406
|
macro_definecolor(node3, state) {
|
278406
278407
|
state.closeParagraph();
|
278407
278408
|
const [name3, kind, spec] = getArguments(node3, "group").map(texToText);
|
278408
|
-
const
|
278409
|
-
if (
|
278410
|
-
state.data.colors[name3] =
|
278409
|
+
const color3 = convertLatexColor(state, node3, kind, spec);
|
278410
|
+
if (color3) {
|
278411
|
+
state.data.colors[name3] = color3;
|
278411
278412
|
}
|
278412
278413
|
}
|
278413
278414
|
};
|
@@ -289101,7 +289102,7 @@ var import_node_path15 = __toESM(require("path"), 1);
|
|
289101
289102
|
var import_nbtx = __toESM(require_cjs2(), 1);
|
289102
289103
|
|
289103
289104
|
// ../myst-cli/dist/version.js
|
289104
|
-
var version2 = "1.3.
|
289105
|
+
var version2 = "1.3.10";
|
289105
289106
|
var version_default2 = version2;
|
289106
289107
|
|
289107
289108
|
// ../myst-cli/dist/utils/headers.js
|
@@ -289899,7 +289900,7 @@ async function transformImageFormats(session, mdast2, file, writeFolder, opts) {
|
|
289899
289900
|
return;
|
289900
289901
|
const inkscapeAvailable = !!inkscape_exports.isInkscapeAvailable();
|
289901
289902
|
const imagemagickAvailable = !!imagemagick_exports.isImageMagickAvailable();
|
289902
|
-
const
|
289903
|
+
const convert6 = async (image6, conversionFns) => {
|
289903
289904
|
const inputFile = import_node_path15.default.join(writeFolder, import_node_path15.default.basename(image6.url));
|
289904
289905
|
let outputFile = null;
|
289905
289906
|
for (const conversionFn of conversionFns) {
|
@@ -289934,7 +289935,7 @@ async function transformImageFormats(session, mdast2, file, writeFolder, opts) {
|
|
289934
289935
|
}
|
289935
289936
|
conversionExts.push(ext2);
|
289936
289937
|
imageNodes.forEach((node3) => {
|
289937
|
-
conversionPromises.push(
|
289938
|
+
conversionPromises.push(convert6(node3, conversionFns));
|
289938
289939
|
});
|
289939
289940
|
});
|
289940
289941
|
if (conversionPromises.length) {
|
@@ -290199,7 +290200,7 @@ function replaceAttachmentsTransform(session, mdast2, attachments, file) {
|
|
290199
290200
|
logMessagesFromVFile(session, vfile2);
|
290200
290201
|
}
|
290201
290202
|
async function processNotebookFull(session, file, content3) {
|
290202
|
-
var _a6, _b;
|
290203
|
+
var _a6, _b, _c;
|
290203
290204
|
const { log } = session;
|
290204
290205
|
const { metadata, cells: cells2 } = JSON.parse(content3);
|
290205
290206
|
const language = (_b = (_a6 = metadata === null || metadata === void 0 ? void 0 : metadata.kernelspec) === null || _a6 === void 0 ? void 0 : _a6.language) !== null && _b !== void 0 ? _b : "python";
|
@@ -290212,6 +290213,7 @@ async function processNotebookFull(session, file, content3) {
|
|
290212
290213
|
...Object.entries(FRONTMATTER_ALIASES).filter(([_3, value]) => PAGE_FRONTMATTER_KEYS.includes(value)).map(([key2, _3]) => key2)
|
290213
290214
|
]);
|
290214
290215
|
const frontmatter = validatePageFrontmatter(filteredMetadata !== null && filteredMetadata !== void 0 ? filteredMetadata : {}, frontmatterValidationOpts(vfile2));
|
290216
|
+
const widgets = (_c = metadata === null || metadata === void 0 ? void 0 : metadata.widgets) !== null && _c !== void 0 ? _c : {};
|
290215
290217
|
let end = cells2.length;
|
290216
290218
|
if (cells2 && cells2.length > 1 && (cells2 === null || cells2 === void 0 ? void 0 : cells2[cells2.length - 1].source.length) === 0) {
|
290217
290219
|
end = -1;
|
@@ -290269,7 +290271,7 @@ async function processNotebookFull(session, file, content3) {
|
|
290269
290271
|
}, Promise.resolve([])));
|
290270
290272
|
logMessagesFromVFile(session, vfile2);
|
290271
290273
|
const mdast2 = { type: "root", children: items };
|
290272
|
-
return { mdast: mdast2, frontmatter };
|
290274
|
+
return { mdast: mdast2, frontmatter, widgets };
|
290273
290275
|
}
|
290274
290276
|
|
290275
290277
|
// ../myst-cli/dist/process/file.js
|
@@ -290290,10 +290292,10 @@ function loadMdFile(session, content3, file, opts) {
|
|
290290
290292
|
async function loadNotebookFile(session, content3, file, opts) {
|
290291
290293
|
const vfile2 = new VFile();
|
290292
290294
|
vfile2.path = file;
|
290293
|
-
const { mdast: mdast2, frontmatter: nbFrontmatter } = await processNotebookFull(session, file, content3);
|
290295
|
+
const { mdast: mdast2, frontmatter: nbFrontmatter, widgets } = await processNotebookFull(session, file, content3);
|
290294
290296
|
const { frontmatter: cellFrontmatter, identifiers } = getPageFrontmatter(session, mdast2, vfile2, opts === null || opts === void 0 ? void 0 : opts.preFrontmatter, opts === null || opts === void 0 ? void 0 : opts.keepTitleNode);
|
290295
290297
|
const frontmatter = fillProjectFrontmatter(cellFrontmatter, nbFrontmatter, frontmatterValidationOpts(vfile2));
|
290296
|
-
return { kind: SourceFileKind.Notebook, mdast: mdast2, frontmatter, identifiers };
|
290298
|
+
return { kind: SourceFileKind.Notebook, mdast: mdast2, frontmatter, identifiers, widgets };
|
290297
290299
|
}
|
290298
290300
|
function loadTexFile(session, content3, file, opts) {
|
290299
290301
|
var _a6;
|
@@ -301505,7 +301507,7 @@ var filter2 = (
|
|
301505
301507
|
* @returns {Node | null}
|
301506
301508
|
*/
|
301507
301509
|
function(tree, options, test2) {
|
301508
|
-
const
|
301510
|
+
const is5 = convert(test2 || options);
|
301509
301511
|
const cascadeRaw = options && typeof options === "object" && "cascade" in options ? (
|
301510
301512
|
/** @type {boolean | null | undefined} */
|
301511
301513
|
options.cascade
|
@@ -301514,7 +301516,7 @@ var filter2 = (
|
|
301514
301516
|
return preorder(tree);
|
301515
301517
|
function preorder(node3, index4, parent2) {
|
301516
301518
|
const children = [];
|
301517
|
-
if (!
|
301519
|
+
if (!is5(node3, index4, parent2))
|
301518
301520
|
return null;
|
301519
301521
|
if (node3.children) {
|
301520
301522
|
let childIndex = -1;
|
@@ -303080,7 +303082,7 @@ async function transformMdast(session, opts) {
|
|
303080
303082
|
const cache = castSession(session);
|
303081
303083
|
if (!cache.$getMdast(file))
|
303082
303084
|
return;
|
303083
|
-
const { mdast: mdastPre, kind, frontmatter: preFrontmatter, location: location4, identifiers } = (_b = (_a6 = cache.$getMdast(file)) === null || _a6 === void 0 ? void 0 : _a6.pre) !== null && _b !== void 0 ? _b : {};
|
303085
|
+
const { mdast: mdastPre, kind, frontmatter: preFrontmatter, location: location4, identifiers, widgets } = (_b = (_a6 = cache.$getMdast(file)) === null || _a6 === void 0 ? void 0 : _a6.pre) !== null && _b !== void 0 ? _b : {};
|
303084
303086
|
if (!mdastPre || !kind || !location4)
|
303085
303087
|
throw new Error(`Expected mdast to be parsed for ${file}`);
|
303086
303088
|
log.debug(`Processing "${file}"`);
|
@@ -303164,7 +303166,8 @@ async function transformMdast(session, opts) {
|
|
303164
303166
|
dependencies: [],
|
303165
303167
|
frontmatter,
|
303166
303168
|
mdast: mdast2,
|
303167
|
-
references
|
303169
|
+
references,
|
303170
|
+
widgets
|
303168
303171
|
};
|
303169
303172
|
const cachedMdast = cache.$getMdast(file);
|
303170
303173
|
if (cachedMdast)
|
@@ -303230,7 +303233,7 @@ async function postProcessMdast(session, { file, checkLinks, pageReferenceStates
|
|
303230
303233
|
await checkLinksTransform(session, file, mdast2);
|
303231
303234
|
}
|
303232
303235
|
async function finalizeMdast(session, mdast2, frontmatter, file, { imageWriteFolder, useExistingImages, imageAltOutputFolder, imageExtensions, optimizeWebp, simplifyFigures, processThumbnail, maxSizeWebp }) {
|
303233
|
-
var _a6;
|
303236
|
+
var _a6, _b;
|
303234
303237
|
const vfile2 = new VFile();
|
303235
303238
|
vfile2.path = file;
|
303236
303239
|
if (simplifyFigures) {
|
@@ -303276,11 +303279,306 @@ async function finalizeMdast(session, mdast2, frontmatter, file, { imageWriteFol
|
|
303276
303279
|
if (postData) {
|
303277
303280
|
postData.frontmatter = frontmatter;
|
303278
303281
|
postData.mdast = mdast2;
|
303282
|
+
postData.widgets = (_b = cache.$getMdast(file)) === null || _b === void 0 ? void 0 : _b.pre.widgets;
|
303279
303283
|
updateFileInfoFromFrontmatter(session, file, frontmatter);
|
303280
303284
|
}
|
303281
303285
|
logMessagesFromVFile(session, vfile2);
|
303282
303286
|
}
|
303283
303287
|
|
303288
|
+
// ../myst-cli/node_modules/unist-util-visit-parents/node_modules/unist-util-is/lib/index.js
|
303289
|
+
var convert4 = (
|
303290
|
+
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
303291
|
+
/**
|
303292
|
+
* @type {(
|
303293
|
+
* (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
|
303294
|
+
* (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
|
303295
|
+
* (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
|
303296
|
+
* ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
|
303297
|
+
* ((test?: Test) => Check)
|
303298
|
+
* )}
|
303299
|
+
*/
|
303300
|
+
/**
|
303301
|
+
* @param {Test} [test]
|
303302
|
+
* @returns {Check}
|
303303
|
+
*/
|
303304
|
+
function(test2) {
|
303305
|
+
if (test2 === null || test2 === void 0) {
|
303306
|
+
return ok3;
|
303307
|
+
}
|
303308
|
+
if (typeof test2 === "function") {
|
303309
|
+
return castFactory3(test2);
|
303310
|
+
}
|
303311
|
+
if (typeof test2 === "object") {
|
303312
|
+
return Array.isArray(test2) ? anyFactory3(test2) : propsFactory2(test2);
|
303313
|
+
}
|
303314
|
+
if (typeof test2 === "string") {
|
303315
|
+
return typeFactory2(test2);
|
303316
|
+
}
|
303317
|
+
throw new Error("Expected function, string, or object as test");
|
303318
|
+
}
|
303319
|
+
);
|
303320
|
+
function anyFactory3(tests) {
|
303321
|
+
const checks2 = [];
|
303322
|
+
let index4 = -1;
|
303323
|
+
while (++index4 < tests.length) {
|
303324
|
+
checks2[index4] = convert4(tests[index4]);
|
303325
|
+
}
|
303326
|
+
return castFactory3(any);
|
303327
|
+
function any(...parameters) {
|
303328
|
+
let index5 = -1;
|
303329
|
+
while (++index5 < checks2.length) {
|
303330
|
+
if (checks2[index5].apply(this, parameters))
|
303331
|
+
return true;
|
303332
|
+
}
|
303333
|
+
return false;
|
303334
|
+
}
|
303335
|
+
}
|
303336
|
+
function propsFactory2(check2) {
|
303337
|
+
const checkAsRecord = (
|
303338
|
+
/** @type {Record<string, unknown>} */
|
303339
|
+
check2
|
303340
|
+
);
|
303341
|
+
return castFactory3(all10);
|
303342
|
+
function all10(node3) {
|
303343
|
+
const nodeAsRecord = (
|
303344
|
+
/** @type {Record<string, unknown>} */
|
303345
|
+
/** @type {unknown} */
|
303346
|
+
node3
|
303347
|
+
);
|
303348
|
+
let key2;
|
303349
|
+
for (key2 in check2) {
|
303350
|
+
if (nodeAsRecord[key2] !== checkAsRecord[key2])
|
303351
|
+
return false;
|
303352
|
+
}
|
303353
|
+
return true;
|
303354
|
+
}
|
303355
|
+
}
|
303356
|
+
function typeFactory2(check2) {
|
303357
|
+
return castFactory3(type2);
|
303358
|
+
function type2(node3) {
|
303359
|
+
return node3 && node3.type === check2;
|
303360
|
+
}
|
303361
|
+
}
|
303362
|
+
function castFactory3(testFunction) {
|
303363
|
+
return check2;
|
303364
|
+
function check2(value, index4, parent2) {
|
303365
|
+
return Boolean(
|
303366
|
+
looksLikeANode(value) && testFunction.call(
|
303367
|
+
this,
|
303368
|
+
value,
|
303369
|
+
typeof index4 === "number" ? index4 : void 0,
|
303370
|
+
parent2 || void 0
|
303371
|
+
)
|
303372
|
+
);
|
303373
|
+
}
|
303374
|
+
}
|
303375
|
+
function ok3() {
|
303376
|
+
return true;
|
303377
|
+
}
|
303378
|
+
function looksLikeANode(value) {
|
303379
|
+
return value !== null && typeof value === "object" && "type" in value;
|
303380
|
+
}
|
303381
|
+
|
303382
|
+
// ../myst-cli/node_modules/unist-util-visit-parents/lib/color.node.js
|
303383
|
+
function color2(d) {
|
303384
|
+
return "\x1B[33m" + d + "\x1B[39m";
|
303385
|
+
}
|
303386
|
+
|
303387
|
+
// ../myst-cli/node_modules/unist-util-visit-parents/lib/index.js
|
303388
|
+
var empty4 = [];
|
303389
|
+
var CONTINUE3 = true;
|
303390
|
+
var EXIT3 = false;
|
303391
|
+
var SKIP3 = "skip";
|
303392
|
+
function visitParents2(tree, test2, visitor, reverse) {
|
303393
|
+
let check2;
|
303394
|
+
if (typeof test2 === "function" && typeof visitor !== "function") {
|
303395
|
+
reverse = visitor;
|
303396
|
+
visitor = test2;
|
303397
|
+
} else {
|
303398
|
+
check2 = test2;
|
303399
|
+
}
|
303400
|
+
const is5 = convert4(check2);
|
303401
|
+
const step = reverse ? -1 : 1;
|
303402
|
+
factory(tree, void 0, [])();
|
303403
|
+
function factory(node3, index4, parents) {
|
303404
|
+
const value = (
|
303405
|
+
/** @type {Record<string, unknown>} */
|
303406
|
+
node3 && typeof node3 === "object" ? node3 : {}
|
303407
|
+
);
|
303408
|
+
if (typeof value.type === "string") {
|
303409
|
+
const name3 = (
|
303410
|
+
// `hast`
|
303411
|
+
typeof value.tagName === "string" ? value.tagName : (
|
303412
|
+
// `xast`
|
303413
|
+
typeof value.name === "string" ? value.name : void 0
|
303414
|
+
)
|
303415
|
+
);
|
303416
|
+
Object.defineProperty(visit4, "name", {
|
303417
|
+
value: "node (" + color2(node3.type + (name3 ? "<" + name3 + ">" : "")) + ")"
|
303418
|
+
});
|
303419
|
+
}
|
303420
|
+
return visit4;
|
303421
|
+
function visit4() {
|
303422
|
+
let result = empty4;
|
303423
|
+
let subresult;
|
303424
|
+
let offset;
|
303425
|
+
let grandparents;
|
303426
|
+
if (!test2 || is5(node3, index4, parents[parents.length - 1] || void 0)) {
|
303427
|
+
result = toResult3(visitor(node3, parents));
|
303428
|
+
if (result[0] === EXIT3) {
|
303429
|
+
return result;
|
303430
|
+
}
|
303431
|
+
}
|
303432
|
+
if ("children" in node3 && node3.children) {
|
303433
|
+
const nodeAsParent = (
|
303434
|
+
/** @type {UnistParent} */
|
303435
|
+
node3
|
303436
|
+
);
|
303437
|
+
if (nodeAsParent.children && result[0] !== SKIP3) {
|
303438
|
+
offset = (reverse ? nodeAsParent.children.length : -1) + step;
|
303439
|
+
grandparents = parents.concat(nodeAsParent);
|
303440
|
+
while (offset > -1 && offset < nodeAsParent.children.length) {
|
303441
|
+
const child = nodeAsParent.children[offset];
|
303442
|
+
subresult = factory(child, offset, grandparents)();
|
303443
|
+
if (subresult[0] === EXIT3) {
|
303444
|
+
return subresult;
|
303445
|
+
}
|
303446
|
+
offset = typeof subresult[1] === "number" ? subresult[1] : offset + step;
|
303447
|
+
}
|
303448
|
+
}
|
303449
|
+
}
|
303450
|
+
return result;
|
303451
|
+
}
|
303452
|
+
}
|
303453
|
+
}
|
303454
|
+
function toResult3(value) {
|
303455
|
+
if (Array.isArray(value)) {
|
303456
|
+
return value;
|
303457
|
+
}
|
303458
|
+
if (typeof value === "number") {
|
303459
|
+
return [CONTINUE3, value];
|
303460
|
+
}
|
303461
|
+
return value === null || value === void 0 ? empty4 : [value];
|
303462
|
+
}
|
303463
|
+
|
303464
|
+
// ../myst-cli/node_modules/unist-util-visit/lib/index.js
|
303465
|
+
function visit3(tree, testOrVisitor, visitorOrReverse, maybeReverse) {
|
303466
|
+
let reverse;
|
303467
|
+
let test2;
|
303468
|
+
let visitor;
|
303469
|
+
if (typeof testOrVisitor === "function" && typeof visitorOrReverse !== "function") {
|
303470
|
+
test2 = void 0;
|
303471
|
+
visitor = testOrVisitor;
|
303472
|
+
reverse = visitorOrReverse;
|
303473
|
+
} else {
|
303474
|
+
test2 = testOrVisitor;
|
303475
|
+
visitor = visitorOrReverse;
|
303476
|
+
reverse = maybeReverse;
|
303477
|
+
}
|
303478
|
+
visitParents2(tree, test2, overload, reverse);
|
303479
|
+
function overload(node3, parents) {
|
303480
|
+
const parent2 = parents[parents.length - 1];
|
303481
|
+
const index4 = parent2 ? parent2.children.indexOf(node3) : void 0;
|
303482
|
+
return visitor(node3, index4, parent2);
|
303483
|
+
}
|
303484
|
+
}
|
303485
|
+
|
303486
|
+
// ../myst-cli/dist/process/search.js
|
303487
|
+
var IGNORED_TYPES = ["myst", "heading"];
|
303488
|
+
var INLINE_BLOCK_TYPES = [
|
303489
|
+
"strong",
|
303490
|
+
"emphasis",
|
303491
|
+
"delete",
|
303492
|
+
"superscript",
|
303493
|
+
"underline",
|
303494
|
+
"subscript",
|
303495
|
+
"abbreviation",
|
303496
|
+
"smallcaps",
|
303497
|
+
"keyboard"
|
303498
|
+
];
|
303499
|
+
function toSectionedParts(content3) {
|
303500
|
+
const sections = [];
|
303501
|
+
const newSection = (heading6) => {
|
303502
|
+
var _a6;
|
303503
|
+
const info = heading6 ? {
|
303504
|
+
text: toText(heading6),
|
303505
|
+
depth: heading6.depth,
|
303506
|
+
html_id: (_a6 = heading6.html_id) !== null && _a6 !== void 0 ? _a6 : heading6.identifier
|
303507
|
+
} : void 0;
|
303508
|
+
sections.push({ heading: info, parts: [] });
|
303509
|
+
};
|
303510
|
+
newSection();
|
303511
|
+
visit3(content3, (node3, index4, parent2) => {
|
303512
|
+
if (node3.type === "heading") {
|
303513
|
+
newSection(node3);
|
303514
|
+
}
|
303515
|
+
if (IGNORED_TYPES.includes(node3.type)) {
|
303516
|
+
return SKIP3;
|
303517
|
+
}
|
303518
|
+
const section = sections[sections.length - 1];
|
303519
|
+
if ("value" in node3 && node3.value) {
|
303520
|
+
section.parts.push(node3.value);
|
303521
|
+
}
|
303522
|
+
if (index4 !== void 0 && parent2 !== void 0 && // Skip literal nodes
|
303523
|
+
"children" in node3 && // Skip inline-block nodes
|
303524
|
+
!INLINE_BLOCK_TYPES.includes(node3.type)) {
|
303525
|
+
let previousNode;
|
303526
|
+
for (let i2 = index4 - 1; i2 >= 0; i2--) {
|
303527
|
+
const maybePreviousNode = parent2.children[i2];
|
303528
|
+
if (maybePreviousNode.type === "heading") {
|
303529
|
+
break;
|
303530
|
+
}
|
303531
|
+
if (!IGNORED_TYPES.includes(maybePreviousNode.type)) {
|
303532
|
+
previousNode = maybePreviousNode;
|
303533
|
+
break;
|
303534
|
+
}
|
303535
|
+
}
|
303536
|
+
if (previousNode !== void 0) {
|
303537
|
+
section.parts.push("\n\n");
|
303538
|
+
}
|
303539
|
+
}
|
303540
|
+
});
|
303541
|
+
return sections;
|
303542
|
+
}
|
303543
|
+
function sectionToHeadingLevel(heading6) {
|
303544
|
+
if (!heading6) {
|
303545
|
+
return "lvl1";
|
303546
|
+
}
|
303547
|
+
switch (heading6.depth) {
|
303548
|
+
case 1:
|
303549
|
+
return "lvl1";
|
303550
|
+
case 2:
|
303551
|
+
return "lvl2";
|
303552
|
+
case 3:
|
303553
|
+
return "lvl3";
|
303554
|
+
case 4:
|
303555
|
+
return "lvl4";
|
303556
|
+
case 5:
|
303557
|
+
return "lvl5";
|
303558
|
+
case 6:
|
303559
|
+
return "lvl6";
|
303560
|
+
default:
|
303561
|
+
throw new Error(`unknown heading depth: ${heading6.depth}`);
|
303562
|
+
}
|
303563
|
+
}
|
303564
|
+
function buildHierarchy(title, sections, index4) {
|
303565
|
+
const result = { lvl1: title };
|
303566
|
+
let currentDepth = 100;
|
303567
|
+
for (let i2 = index4; i2 > 0; i2--) {
|
303568
|
+
const { heading: heading6 } = sections[i2];
|
303569
|
+
if (heading6 === void 0) {
|
303570
|
+
throw new Error();
|
303571
|
+
}
|
303572
|
+
if (heading6.depth >= currentDepth) {
|
303573
|
+
continue;
|
303574
|
+
}
|
303575
|
+
const lvl = sectionToHeadingLevel(heading6);
|
303576
|
+
result[lvl] = heading6.text;
|
303577
|
+
currentDepth = heading6.depth;
|
303578
|
+
}
|
303579
|
+
return result;
|
303580
|
+
}
|
303581
|
+
|
303284
303582
|
// ../myst-cli/dist/process/site.js
|
303285
303583
|
var WEB_IMAGE_EXTENSIONS = [
|
303286
303584
|
ImageExtensions.mp4,
|
@@ -303344,6 +303642,53 @@ async function writeMystXRefJson(session, states) {
|
|
303344
303642
|
session.log.debug(`Writing myst.xref.json file: ${filename}`);
|
303345
303643
|
writeFileToFolder(filename, JSON.stringify(mystXRefs));
|
303346
303644
|
}
|
303645
|
+
async function writeMystSearchJson(session, pages) {
|
303646
|
+
const records = [...pages].sort((left2, right2) => {
|
303647
|
+
if (left2.file < right2.file) {
|
303648
|
+
return -1;
|
303649
|
+
} else if (left2.file > right2.file) {
|
303650
|
+
return 1;
|
303651
|
+
} else {
|
303652
|
+
return 0;
|
303653
|
+
}
|
303654
|
+
}).map((page) => selectFile(session, page.file)).map((file) => {
|
303655
|
+
var _a6;
|
303656
|
+
const { mdast: mdast2, slug, frontmatter } = file !== null && file !== void 0 ? file : {};
|
303657
|
+
if (!mdast2 || !frontmatter) {
|
303658
|
+
return [];
|
303659
|
+
}
|
303660
|
+
const title = (_a6 = frontmatter.title) !== null && _a6 !== void 0 ? _a6 : "";
|
303661
|
+
const sections = toSectionedParts(mdast2);
|
303662
|
+
const pageURL = slug && DEFAULT_INDEX_FILENAMES.includes(slug) ? "/" : `/${slug}`;
|
303663
|
+
return sections.map((section, index4) => {
|
303664
|
+
var _a7;
|
303665
|
+
const hierarchy = buildHierarchy(title, sections, index4);
|
303666
|
+
const recordURL = ((_a7 = section.heading) === null || _a7 === void 0 ? void 0 : _a7.html_id) ? `${pageURL}#${section.heading.html_id}` : pageURL;
|
303667
|
+
return [
|
303668
|
+
{
|
303669
|
+
hierarchy,
|
303670
|
+
type: sectionToHeadingLevel(section.heading),
|
303671
|
+
url: recordURL,
|
303672
|
+
position: 2 * index4
|
303673
|
+
},
|
303674
|
+
{
|
303675
|
+
hierarchy,
|
303676
|
+
content: section.parts.join(""),
|
303677
|
+
type: "content",
|
303678
|
+
url: recordURL,
|
303679
|
+
position: 2 * index4 + 1
|
303680
|
+
}
|
303681
|
+
];
|
303682
|
+
}).flat();
|
303683
|
+
}).flat();
|
303684
|
+
const data = {
|
303685
|
+
version: "1",
|
303686
|
+
records
|
303687
|
+
};
|
303688
|
+
const filename = (0, import_node_path37.join)(session.sitePath(), "myst.search.json");
|
303689
|
+
session.log.debug(`Writing myst.search.json file: ${filename}`);
|
303690
|
+
writeFileToFolder(filename, JSON.stringify(data));
|
303691
|
+
}
|
303347
303692
|
async function writeObjectsInv(session, states, siteConfig) {
|
303348
303693
|
const inv = new Inventory({
|
303349
303694
|
project: siteConfig === null || siteConfig === void 0 ? void 0 : siteConfig.title,
|
@@ -303447,7 +303792,7 @@ async function writeFile(session, { file, pageSlug, projectSlug, projectPath })
|
|
303447
303792
|
const selectedFile = selectFile(session, file);
|
303448
303793
|
if (!selectedFile)
|
303449
303794
|
return;
|
303450
|
-
const { frontmatter, mdast: mdast2, kind, sha256, slug, references, dependencies, location: location4 } = selectedFile;
|
303795
|
+
const { frontmatter, mdast: mdast2, kind, sha256, slug, references, dependencies, location: location4, widgets } = selectedFile;
|
303451
303796
|
const exports2 = await Promise.all([
|
303452
303797
|
resolvePageSource(session, file),
|
303453
303798
|
...await resolvePageExports(session, file)
|
@@ -303465,6 +303810,7 @@ async function writeFile(session, { file, pageSlug, projectSlug, projectPath })
|
|
303465
303810
|
location: location4,
|
303466
303811
|
dependencies,
|
303467
303812
|
frontmatter: frontmatterWithExports,
|
303813
|
+
widgets,
|
303468
303814
|
mdast: mdast2,
|
303469
303815
|
references
|
303470
303816
|
}));
|
@@ -303638,16 +303984,19 @@ ${page.file}
|
|
303638
303984
|
if ((_b = opts === null || opts === void 0 ? void 0 : opts.writeFiles) !== null && _b !== void 0 ? _b : true) {
|
303639
303985
|
await writeSiteManifest(session, opts);
|
303640
303986
|
const states = [];
|
303987
|
+
const allPages = [];
|
303641
303988
|
await Promise.all(siteConfig.projects.map(async (project) => {
|
303642
303989
|
if (!project.path)
|
303643
303990
|
return;
|
303644
303991
|
const { pages } = await loadProject(session, project.path);
|
303992
|
+
allPages.push(...pages);
|
303645
303993
|
states.push(...selectPageReferenceStates(session, pages, {
|
303646
303994
|
suppressWarnings: true
|
303647
303995
|
}));
|
303648
303996
|
}));
|
303649
303997
|
await writeObjectsInv(session, states, siteConfig);
|
303650
303998
|
await writeMystXRefJson(session, states);
|
303999
|
+
await writeMystSearchJson(session, allPages);
|
303651
304000
|
}
|
303652
304001
|
return true;
|
303653
304002
|
}
|
@@ -306278,7 +306627,7 @@ var State4 = class {
|
|
306278
306627
|
}
|
306279
306628
|
}
|
306280
306629
|
};
|
306281
|
-
function
|
306630
|
+
function convert5(state, node3) {
|
306282
306631
|
if (node3.type === "macro" && typeof node3.content === "string") {
|
306283
306632
|
const result = typstMacros[node3.content];
|
306284
306633
|
const converted = typeof result === "function" ? result(state, node3) : result;
|
@@ -306315,7 +306664,7 @@ function writeTypst(node3, state = new State4()) {
|
|
306315
306664
|
if (wrapChildren2)
|
306316
306665
|
state.closeFunction();
|
306317
306666
|
} else if (node3.type === "macro" && Array.isArray(node3.args)) {
|
306318
|
-
const converted =
|
306667
|
+
const converted = convert5(state, node3);
|
306319
306668
|
if (node3.args.length === 0) {
|
306320
306669
|
state.write(converted);
|
306321
306670
|
return state;
|
@@ -306332,7 +306681,7 @@ function writeTypst(node3, state = new State4()) {
|
|
306332
306681
|
});
|
306333
306682
|
state.closeFunction();
|
306334
306683
|
} else if (node3.type === "macro" && typeof node3.content === "string") {
|
306335
|
-
const converted =
|
306684
|
+
const converted = convert5(state, node3);
|
306336
306685
|
state.write(converted !== null && converted !== void 0 ? converted : node3.content);
|
306337
306686
|
}
|
306338
306687
|
return state;
|
@@ -306450,8 +306799,9 @@ var tableHandler = (node3, state) => {
|
|
306450
306799
|
});
|
306451
306800
|
return;
|
306452
306801
|
}
|
306453
|
-
state.useMacro('#import "@preview/tablex:0.0.
|
306454
|
-
state.
|
306802
|
+
state.useMacro('#import "@preview/tablex:0.0.8": tablex, cellx, hlinex, vlinex');
|
306803
|
+
state.useMacro("#let tableStyle = (:)");
|
306804
|
+
state.write(`${command}(columns: ${columns}, header-rows: ${countHeaderRows(node3)}, repeat-header: true, ..tableStyle,
|
306455
306805
|
`);
|
306456
306806
|
state.renderChildren(node3, 1);
|
306457
306807
|
state.write(")\n");
|
@@ -316122,6 +316472,7 @@ async function startContentServer(session, opts) {
|
|
316122
316472
|
app.use("/config.json", import_express.default.static((0, import_node_path53.join)(session.sitePath(), "config.json")));
|
316123
316473
|
app.use("/objects.inv", import_express.default.static((0, import_node_path53.join)(session.sitePath(), "objects.inv")));
|
316124
316474
|
app.use("/myst.xref.json", import_express.default.static((0, import_node_path53.join)(session.sitePath(), "myst.xref.json")));
|
316475
|
+
app.use("/myst.search.json", import_express.default.static((0, import_node_path53.join)(session.sitePath(), "myst.search.json")));
|
316125
316476
|
const server = app.listen(port, () => {
|
316126
316477
|
session.log.debug(`Content server listening on port ${port}`);
|
316127
316478
|
});
|
@@ -316347,6 +316698,7 @@ async function buildHtml(session, opts) {
|
|
316347
316698
|
ref.data = (_a7 = ref.data) === null || _a7 === void 0 ? void 0 : _a7.replace(/^\/content/, "");
|
316348
316699
|
});
|
316349
316700
|
import_fs_extra.default.writeFileSync(import_node_path54.default.join(htmlDir, "myst.xref.json"), JSON.stringify(xrefs));
|
316701
|
+
import_fs_extra.default.copySync(import_node_path54.default.join(session.sitePath(), "myst.search.json"), import_node_path54.default.join(htmlDir, "myst.search.json"));
|
316350
316702
|
rewriteAssetsFolder(htmlDir, baseurl);
|
316351
316703
|
process.exit(0);
|
316352
316704
|
}
|
@@ -324347,7 +324699,7 @@ function isOfType(type2) {
|
|
324347
324699
|
var { toString: toString5 } = Object.prototype;
|
324348
324700
|
var getObjectType = (value) => {
|
324349
324701
|
const objectTypeName = toString5.call(value).slice(8, -1);
|
324350
|
-
if (/HTML\w+Element/.test(objectTypeName) &&
|
324702
|
+
if (/HTML\w+Element/.test(objectTypeName) && is4.domElement(value)) {
|
324351
324703
|
return "HTMLElement";
|
324352
324704
|
}
|
324353
324705
|
if (isObjectTypeName(objectTypeName)) {
|
@@ -324356,7 +324708,7 @@ var getObjectType = (value) => {
|
|
324356
324708
|
return void 0;
|
324357
324709
|
};
|
324358
324710
|
var isObjectOfType = (type2) => (value) => getObjectType(value) === type2;
|
324359
|
-
function
|
324711
|
+
function is4(value) {
|
324360
324712
|
if (value === null) {
|
324361
324713
|
return "null";
|
324362
324714
|
}
|
@@ -324384,13 +324736,13 @@ function is3(value) {
|
|
324384
324736
|
}
|
324385
324737
|
default:
|
324386
324738
|
}
|
324387
|
-
if (
|
324739
|
+
if (is4.observable(value)) {
|
324388
324740
|
return "Observable";
|
324389
324741
|
}
|
324390
|
-
if (
|
324742
|
+
if (is4.array(value)) {
|
324391
324743
|
return "Array";
|
324392
324744
|
}
|
324393
|
-
if (
|
324745
|
+
if (is4.buffer(value)) {
|
324394
324746
|
return "Buffer";
|
324395
324747
|
}
|
324396
324748
|
const tagType = getObjectType(value);
|
@@ -324402,71 +324754,71 @@ function is3(value) {
|
|
324402
324754
|
}
|
324403
324755
|
return "Object";
|
324404
324756
|
}
|
324405
|
-
|
324406
|
-
|
324757
|
+
is4.undefined = isOfType("undefined");
|
324758
|
+
is4.string = isOfType("string");
|
324407
324759
|
var isNumberType = isOfType("number");
|
324408
|
-
|
324409
|
-
|
324410
|
-
|
324411
|
-
|
324412
|
-
|
324413
|
-
|
324414
|
-
|
324415
|
-
|
324416
|
-
|
324760
|
+
is4.number = (value) => isNumberType(value) && !is4.nan(value);
|
324761
|
+
is4.bigint = isOfType("bigint");
|
324762
|
+
is4.function_ = isOfType("function");
|
324763
|
+
is4.null_ = (value) => value === null;
|
324764
|
+
is4.class_ = (value) => is4.function_(value) && value.toString().startsWith("class ");
|
324765
|
+
is4.boolean = (value) => value === true || value === false;
|
324766
|
+
is4.symbol = isOfType("symbol");
|
324767
|
+
is4.numericString = (value) => is4.string(value) && !is4.emptyStringOrWhitespace(value) && !Number.isNaN(Number(value));
|
324768
|
+
is4.array = (value, assertion) => {
|
324417
324769
|
if (!Array.isArray(value)) {
|
324418
324770
|
return false;
|
324419
324771
|
}
|
324420
|
-
if (!
|
324772
|
+
if (!is4.function_(assertion)) {
|
324421
324773
|
return true;
|
324422
324774
|
}
|
324423
324775
|
return value.every((element5) => assertion(element5));
|
324424
324776
|
};
|
324425
|
-
|
324777
|
+
is4.buffer = (value) => {
|
324426
324778
|
var _a6, _b;
|
324427
324779
|
return ((_b = (_a6 = value == null ? void 0 : value.constructor) == null ? void 0 : _a6.isBuffer) == null ? void 0 : _b.call(_a6, value)) ?? false;
|
324428
324780
|
};
|
324429
|
-
|
324430
|
-
|
324431
|
-
|
324432
|
-
|
324433
|
-
|
324434
|
-
|
324435
|
-
|
324436
|
-
|
324437
|
-
var hasPromiseApi = (value) =>
|
324438
|
-
|
324439
|
-
|
324440
|
-
|
324441
|
-
|
324442
|
-
|
324443
|
-
|
324444
|
-
|
324445
|
-
|
324446
|
-
|
324447
|
-
|
324448
|
-
|
324449
|
-
|
324450
|
-
|
324451
|
-
|
324452
|
-
|
324453
|
-
|
324454
|
-
|
324455
|
-
|
324456
|
-
|
324457
|
-
|
324458
|
-
|
324459
|
-
|
324460
|
-
|
324461
|
-
|
324462
|
-
|
324463
|
-
|
324464
|
-
|
324465
|
-
|
324466
|
-
|
324467
|
-
|
324468
|
-
|
324469
|
-
if (!
|
324781
|
+
is4.blob = (value) => isObjectOfType("Blob")(value);
|
324782
|
+
is4.nullOrUndefined = (value) => is4.null_(value) || is4.undefined(value);
|
324783
|
+
is4.object = (value) => !is4.null_(value) && (typeof value === "object" || is4.function_(value));
|
324784
|
+
is4.iterable = (value) => is4.function_(value == null ? void 0 : value[Symbol.iterator]);
|
324785
|
+
is4.asyncIterable = (value) => is4.function_(value == null ? void 0 : value[Symbol.asyncIterator]);
|
324786
|
+
is4.generator = (value) => is4.iterable(value) && is4.function_(value == null ? void 0 : value.next) && is4.function_(value == null ? void 0 : value.throw);
|
324787
|
+
is4.asyncGenerator = (value) => is4.asyncIterable(value) && is4.function_(value.next) && is4.function_(value.throw);
|
324788
|
+
is4.nativePromise = (value) => isObjectOfType("Promise")(value);
|
324789
|
+
var hasPromiseApi = (value) => is4.function_(value == null ? void 0 : value.then) && is4.function_(value == null ? void 0 : value.catch);
|
324790
|
+
is4.promise = (value) => is4.nativePromise(value) || hasPromiseApi(value);
|
324791
|
+
is4.generatorFunction = isObjectOfType("GeneratorFunction");
|
324792
|
+
is4.asyncGeneratorFunction = (value) => getObjectType(value) === "AsyncGeneratorFunction";
|
324793
|
+
is4.asyncFunction = (value) => getObjectType(value) === "AsyncFunction";
|
324794
|
+
is4.boundFunction = (value) => is4.function_(value) && !value.hasOwnProperty("prototype");
|
324795
|
+
is4.regExp = isObjectOfType("RegExp");
|
324796
|
+
is4.date = isObjectOfType("Date");
|
324797
|
+
is4.error = isObjectOfType("Error");
|
324798
|
+
is4.map = (value) => isObjectOfType("Map")(value);
|
324799
|
+
is4.set = (value) => isObjectOfType("Set")(value);
|
324800
|
+
is4.weakMap = (value) => isObjectOfType("WeakMap")(value);
|
324801
|
+
is4.weakSet = (value) => isObjectOfType("WeakSet")(value);
|
324802
|
+
is4.weakRef = (value) => isObjectOfType("WeakRef")(value);
|
324803
|
+
is4.int8Array = isObjectOfType("Int8Array");
|
324804
|
+
is4.uint8Array = isObjectOfType("Uint8Array");
|
324805
|
+
is4.uint8ClampedArray = isObjectOfType("Uint8ClampedArray");
|
324806
|
+
is4.int16Array = isObjectOfType("Int16Array");
|
324807
|
+
is4.uint16Array = isObjectOfType("Uint16Array");
|
324808
|
+
is4.int32Array = isObjectOfType("Int32Array");
|
324809
|
+
is4.uint32Array = isObjectOfType("Uint32Array");
|
324810
|
+
is4.float32Array = isObjectOfType("Float32Array");
|
324811
|
+
is4.float64Array = isObjectOfType("Float64Array");
|
324812
|
+
is4.bigInt64Array = isObjectOfType("BigInt64Array");
|
324813
|
+
is4.bigUint64Array = isObjectOfType("BigUint64Array");
|
324814
|
+
is4.arrayBuffer = isObjectOfType("ArrayBuffer");
|
324815
|
+
is4.sharedArrayBuffer = isObjectOfType("SharedArrayBuffer");
|
324816
|
+
is4.dataView = isObjectOfType("DataView");
|
324817
|
+
is4.enumCase = (value, targetEnum) => Object.values(targetEnum).includes(value);
|
324818
|
+
is4.directInstanceOf = (instance, class_) => Object.getPrototypeOf(instance) === class_.prototype;
|
324819
|
+
is4.urlInstance = (value) => isObjectOfType("URL")(value);
|
324820
|
+
is4.urlString = (value) => {
|
324821
|
+
if (!is4.string(value)) {
|
324470
324822
|
return false;
|
324471
324823
|
}
|
324472
324824
|
try {
|
@@ -324476,27 +324828,27 @@ is3.urlString = (value) => {
|
|
324476
324828
|
return false;
|
324477
324829
|
}
|
324478
324830
|
};
|
324479
|
-
|
324480
|
-
|
324481
|
-
|
324482
|
-
|
324483
|
-
|
324484
|
-
|
324485
|
-
|
324831
|
+
is4.truthy = (value) => Boolean(value);
|
324832
|
+
is4.falsy = (value) => !value;
|
324833
|
+
is4.nan = (value) => Number.isNaN(value);
|
324834
|
+
is4.primitive = (value) => is4.null_(value) || isPrimitiveTypeName(typeof value);
|
324835
|
+
is4.integer = (value) => Number.isInteger(value);
|
324836
|
+
is4.safeInteger = (value) => Number.isSafeInteger(value);
|
324837
|
+
is4.plainObject = (value) => {
|
324486
324838
|
if (typeof value !== "object" || value === null) {
|
324487
324839
|
return false;
|
324488
324840
|
}
|
324489
324841
|
const prototype = Object.getPrototypeOf(value);
|
324490
324842
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
|
324491
324843
|
};
|
324492
|
-
|
324493
|
-
var isValidLength = (value) =>
|
324494
|
-
|
324495
|
-
|
324496
|
-
if (
|
324844
|
+
is4.typedArray = (value) => isTypedArrayName(getObjectType(value));
|
324845
|
+
var isValidLength = (value) => is4.safeInteger(value) && value >= 0;
|
324846
|
+
is4.arrayLike = (value) => !is4.nullOrUndefined(value) && !is4.function_(value) && isValidLength(value.length);
|
324847
|
+
is4.inRange = (value, range) => {
|
324848
|
+
if (is4.number(range)) {
|
324497
324849
|
return value >= Math.min(0, range) && value <= Math.max(range, 0);
|
324498
324850
|
}
|
324499
|
-
if (
|
324851
|
+
if (is4.array(range) && range.length === 2) {
|
324500
324852
|
return value >= Math.min(...range) && value <= Math.max(...range);
|
324501
324853
|
}
|
324502
324854
|
throw new TypeError(`Invalid range: ${JSON.stringify(range)}`);
|
@@ -324509,8 +324861,8 @@ var DOM_PROPERTIES_TO_CHECK = [
|
|
324509
324861
|
"attributes",
|
324510
324862
|
"nodeValue"
|
324511
324863
|
];
|
324512
|
-
|
324513
|
-
|
324864
|
+
is4.domElement = (value) => is4.object(value) && value.nodeType === NODE_TYPE_ELEMENT && is4.string(value.nodeName) && !is4.plainObject(value) && DOM_PROPERTIES_TO_CHECK.every((property) => property in value);
|
324865
|
+
is4.observable = (value) => {
|
324514
324866
|
var _a6, _b;
|
324515
324867
|
if (!value) {
|
324516
324868
|
return false;
|
@@ -324523,29 +324875,29 @@ is3.observable = (value) => {
|
|
324523
324875
|
}
|
324524
324876
|
return false;
|
324525
324877
|
};
|
324526
|
-
|
324527
|
-
|
324528
|
-
var isAbsoluteMod2 = (remainder) => (value) =>
|
324529
|
-
|
324530
|
-
|
324531
|
-
|
324532
|
-
|
324533
|
-
|
324534
|
-
var isWhiteSpaceString = (value) =>
|
324535
|
-
|
324536
|
-
|
324537
|
-
|
324538
|
-
|
324539
|
-
|
324540
|
-
|
324541
|
-
|
324542
|
-
|
324543
|
-
|
324544
|
-
|
324545
|
-
|
324546
|
-
|
324878
|
+
is4.nodeStream = (value) => is4.object(value) && is4.function_(value.pipe) && !is4.observable(value);
|
324879
|
+
is4.infinite = (value) => value === Number.POSITIVE_INFINITY || value === Number.NEGATIVE_INFINITY;
|
324880
|
+
var isAbsoluteMod2 = (remainder) => (value) => is4.integer(value) && Math.abs(value % 2) === remainder;
|
324881
|
+
is4.evenInteger = isAbsoluteMod2(0);
|
324882
|
+
is4.oddInteger = isAbsoluteMod2(1);
|
324883
|
+
is4.emptyArray = (value) => is4.array(value) && value.length === 0;
|
324884
|
+
is4.nonEmptyArray = (value) => is4.array(value) && value.length > 0;
|
324885
|
+
is4.emptyString = (value) => is4.string(value) && value.length === 0;
|
324886
|
+
var isWhiteSpaceString = (value) => is4.string(value) && !/\S/.test(value);
|
324887
|
+
is4.emptyStringOrWhitespace = (value) => is4.emptyString(value) || isWhiteSpaceString(value);
|
324888
|
+
is4.nonEmptyString = (value) => is4.string(value) && value.length > 0;
|
324889
|
+
is4.nonEmptyStringAndNotWhitespace = (value) => is4.string(value) && !is4.emptyStringOrWhitespace(value);
|
324890
|
+
is4.emptyObject = (value) => is4.object(value) && !is4.map(value) && !is4.set(value) && Object.keys(value).length === 0;
|
324891
|
+
is4.nonEmptyObject = (value) => is4.object(value) && !is4.map(value) && !is4.set(value) && Object.keys(value).length > 0;
|
324892
|
+
is4.emptySet = (value) => is4.set(value) && value.size === 0;
|
324893
|
+
is4.nonEmptySet = (value) => is4.set(value) && value.size > 0;
|
324894
|
+
is4.emptyMap = (value) => is4.map(value) && value.size === 0;
|
324895
|
+
is4.nonEmptyMap = (value) => is4.map(value) && value.size > 0;
|
324896
|
+
is4.propertyKey = (value) => is4.any([is4.string, is4.number, is4.symbol], value);
|
324897
|
+
is4.formData = (value) => isObjectOfType("FormData")(value);
|
324898
|
+
is4.urlSearchParams = (value) => isObjectOfType("URLSearchParams")(value);
|
324547
324899
|
var predicateOnArray = (method, predicate, values) => {
|
324548
|
-
if (!
|
324900
|
+
if (!is4.function_(predicate)) {
|
324549
324901
|
throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`);
|
324550
324902
|
}
|
324551
324903
|
if (values.length === 0) {
|
@@ -324553,128 +324905,128 @@ var predicateOnArray = (method, predicate, values) => {
|
|
324553
324905
|
}
|
324554
324906
|
return method.call(values, predicate);
|
324555
324907
|
};
|
324556
|
-
|
324557
|
-
const predicates =
|
324908
|
+
is4.any = (predicate, ...values) => {
|
324909
|
+
const predicates = is4.array(predicate) ? predicate : [predicate];
|
324558
324910
|
return predicates.some((singlePredicate) => predicateOnArray(Array.prototype.some, singlePredicate, values));
|
324559
324911
|
};
|
324560
|
-
|
324912
|
+
is4.all = (predicate, ...values) => predicateOnArray(Array.prototype.every, predicate, values);
|
324561
324913
|
var assertType = (condition, description, value, options = {}) => {
|
324562
324914
|
if (!condition) {
|
324563
324915
|
const { multipleValues } = options;
|
324564
324916
|
const valuesMessage = multipleValues ? `received values of types ${[
|
324565
|
-
...new Set(value.map((singleValue) => `\`${
|
324566
|
-
].join(", ")}` : `received value of type \`${
|
324917
|
+
...new Set(value.map((singleValue) => `\`${is4(singleValue)}\``))
|
324918
|
+
].join(", ")}` : `received value of type \`${is4(value)}\``;
|
324567
324919
|
throw new TypeError(`Expected value which is \`${description}\`, ${valuesMessage}.`);
|
324568
324920
|
}
|
324569
324921
|
};
|
324570
324922
|
var assert5 = {
|
324571
324923
|
// Unknowns.
|
324572
|
-
undefined: (value) => assertType(
|
324573
|
-
string: (value) => assertType(
|
324574
|
-
number: (value) => assertType(
|
324575
|
-
bigint: (value) => assertType(
|
324924
|
+
undefined: (value) => assertType(is4.undefined(value), "undefined", value),
|
324925
|
+
string: (value) => assertType(is4.string(value), "string", value),
|
324926
|
+
number: (value) => assertType(is4.number(value), "number", value),
|
324927
|
+
bigint: (value) => assertType(is4.bigint(value), "bigint", value),
|
324576
324928
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
324577
|
-
function_: (value) => assertType(
|
324578
|
-
null_: (value) => assertType(
|
324579
|
-
class_: (value) => assertType(
|
324580
|
-
boolean: (value) => assertType(
|
324581
|
-
symbol: (value) => assertType(
|
324582
|
-
numericString: (value) => assertType(
|
324929
|
+
function_: (value) => assertType(is4.function_(value), "Function", value),
|
324930
|
+
null_: (value) => assertType(is4.null_(value), "null", value),
|
324931
|
+
class_: (value) => assertType(is4.class_(value), "Class", value),
|
324932
|
+
boolean: (value) => assertType(is4.boolean(value), "boolean", value),
|
324933
|
+
symbol: (value) => assertType(is4.symbol(value), "symbol", value),
|
324934
|
+
numericString: (value) => assertType(is4.numericString(value), "string with a number", value),
|
324583
324935
|
array: (value, assertion) => {
|
324584
324936
|
const assert6 = assertType;
|
324585
|
-
assert6(
|
324937
|
+
assert6(is4.array(value), "Array", value);
|
324586
324938
|
if (assertion) {
|
324587
324939
|
value.forEach(assertion);
|
324588
324940
|
}
|
324589
324941
|
},
|
324590
|
-
buffer: (value) => assertType(
|
324591
|
-
blob: (value) => assertType(
|
324592
|
-
nullOrUndefined: (value) => assertType(
|
324593
|
-
object: (value) => assertType(
|
324594
|
-
iterable: (value) => assertType(
|
324595
|
-
asyncIterable: (value) => assertType(
|
324596
|
-
generator: (value) => assertType(
|
324597
|
-
asyncGenerator: (value) => assertType(
|
324598
|
-
nativePromise: (value) => assertType(
|
324599
|
-
promise: (value) => assertType(
|
324600
|
-
generatorFunction: (value) => assertType(
|
324601
|
-
asyncGeneratorFunction: (value) => assertType(
|
324942
|
+
buffer: (value) => assertType(is4.buffer(value), "Buffer", value),
|
324943
|
+
blob: (value) => assertType(is4.blob(value), "Blob", value),
|
324944
|
+
nullOrUndefined: (value) => assertType(is4.nullOrUndefined(value), "null or undefined", value),
|
324945
|
+
object: (value) => assertType(is4.object(value), "Object", value),
|
324946
|
+
iterable: (value) => assertType(is4.iterable(value), "Iterable", value),
|
324947
|
+
asyncIterable: (value) => assertType(is4.asyncIterable(value), "AsyncIterable", value),
|
324948
|
+
generator: (value) => assertType(is4.generator(value), "Generator", value),
|
324949
|
+
asyncGenerator: (value) => assertType(is4.asyncGenerator(value), "AsyncGenerator", value),
|
324950
|
+
nativePromise: (value) => assertType(is4.nativePromise(value), "native Promise", value),
|
324951
|
+
promise: (value) => assertType(is4.promise(value), "Promise", value),
|
324952
|
+
generatorFunction: (value) => assertType(is4.generatorFunction(value), "GeneratorFunction", value),
|
324953
|
+
asyncGeneratorFunction: (value) => assertType(is4.asyncGeneratorFunction(value), "AsyncGeneratorFunction", value),
|
324602
324954
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
324603
|
-
asyncFunction: (value) => assertType(
|
324955
|
+
asyncFunction: (value) => assertType(is4.asyncFunction(value), "AsyncFunction", value),
|
324604
324956
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
324605
|
-
boundFunction: (value) => assertType(
|
324606
|
-
regExp: (value) => assertType(
|
324607
|
-
date: (value) => assertType(
|
324608
|
-
error: (value) => assertType(
|
324609
|
-
map: (value) => assertType(
|
324610
|
-
set: (value) => assertType(
|
324611
|
-
weakMap: (value) => assertType(
|
324612
|
-
weakSet: (value) => assertType(
|
324613
|
-
weakRef: (value) => assertType(
|
324614
|
-
int8Array: (value) => assertType(
|
324615
|
-
uint8Array: (value) => assertType(
|
324616
|
-
uint8ClampedArray: (value) => assertType(
|
324617
|
-
int16Array: (value) => assertType(
|
324618
|
-
uint16Array: (value) => assertType(
|
324619
|
-
int32Array: (value) => assertType(
|
324620
|
-
uint32Array: (value) => assertType(
|
324621
|
-
float32Array: (value) => assertType(
|
324622
|
-
float64Array: (value) => assertType(
|
324623
|
-
bigInt64Array: (value) => assertType(
|
324624
|
-
bigUint64Array: (value) => assertType(
|
324625
|
-
arrayBuffer: (value) => assertType(
|
324626
|
-
sharedArrayBuffer: (value) => assertType(
|
324627
|
-
dataView: (value) => assertType(
|
324628
|
-
enumCase: (value, targetEnum) => assertType(
|
324629
|
-
urlInstance: (value) => assertType(
|
324630
|
-
urlString: (value) => assertType(
|
324631
|
-
truthy: (value) => assertType(
|
324632
|
-
falsy: (value) => assertType(
|
324633
|
-
nan: (value) => assertType(
|
324634
|
-
primitive: (value) => assertType(
|
324635
|
-
integer: (value) => assertType(
|
324636
|
-
safeInteger: (value) => assertType(
|
324637
|
-
plainObject: (value) => assertType(
|
324638
|
-
typedArray: (value) => assertType(
|
324639
|
-
arrayLike: (value) => assertType(
|
324640
|
-
domElement: (value) => assertType(
|
324641
|
-
observable: (value) => assertType(
|
324642
|
-
nodeStream: (value) => assertType(
|
324643
|
-
infinite: (value) => assertType(
|
324644
|
-
emptyArray: (value) => assertType(
|
324645
|
-
nonEmptyArray: (value) => assertType(
|
324646
|
-
emptyString: (value) => assertType(
|
324647
|
-
emptyStringOrWhitespace: (value) => assertType(
|
324648
|
-
nonEmptyString: (value) => assertType(
|
324649
|
-
nonEmptyStringAndNotWhitespace: (value) => assertType(
|
324650
|
-
emptyObject: (value) => assertType(
|
324651
|
-
nonEmptyObject: (value) => assertType(
|
324652
|
-
emptySet: (value) => assertType(
|
324653
|
-
nonEmptySet: (value) => assertType(
|
324654
|
-
emptyMap: (value) => assertType(
|
324655
|
-
nonEmptyMap: (value) => assertType(
|
324656
|
-
propertyKey: (value) => assertType(
|
324657
|
-
formData: (value) => assertType(
|
324658
|
-
urlSearchParams: (value) => assertType(
|
324957
|
+
boundFunction: (value) => assertType(is4.boundFunction(value), "Function", value),
|
324958
|
+
regExp: (value) => assertType(is4.regExp(value), "RegExp", value),
|
324959
|
+
date: (value) => assertType(is4.date(value), "Date", value),
|
324960
|
+
error: (value) => assertType(is4.error(value), "Error", value),
|
324961
|
+
map: (value) => assertType(is4.map(value), "Map", value),
|
324962
|
+
set: (value) => assertType(is4.set(value), "Set", value),
|
324963
|
+
weakMap: (value) => assertType(is4.weakMap(value), "WeakMap", value),
|
324964
|
+
weakSet: (value) => assertType(is4.weakSet(value), "WeakSet", value),
|
324965
|
+
weakRef: (value) => assertType(is4.weakRef(value), "WeakRef", value),
|
324966
|
+
int8Array: (value) => assertType(is4.int8Array(value), "Int8Array", value),
|
324967
|
+
uint8Array: (value) => assertType(is4.uint8Array(value), "Uint8Array", value),
|
324968
|
+
uint8ClampedArray: (value) => assertType(is4.uint8ClampedArray(value), "Uint8ClampedArray", value),
|
324969
|
+
int16Array: (value) => assertType(is4.int16Array(value), "Int16Array", value),
|
324970
|
+
uint16Array: (value) => assertType(is4.uint16Array(value), "Uint16Array", value),
|
324971
|
+
int32Array: (value) => assertType(is4.int32Array(value), "Int32Array", value),
|
324972
|
+
uint32Array: (value) => assertType(is4.uint32Array(value), "Uint32Array", value),
|
324973
|
+
float32Array: (value) => assertType(is4.float32Array(value), "Float32Array", value),
|
324974
|
+
float64Array: (value) => assertType(is4.float64Array(value), "Float64Array", value),
|
324975
|
+
bigInt64Array: (value) => assertType(is4.bigInt64Array(value), "BigInt64Array", value),
|
324976
|
+
bigUint64Array: (value) => assertType(is4.bigUint64Array(value), "BigUint64Array", value),
|
324977
|
+
arrayBuffer: (value) => assertType(is4.arrayBuffer(value), "ArrayBuffer", value),
|
324978
|
+
sharedArrayBuffer: (value) => assertType(is4.sharedArrayBuffer(value), "SharedArrayBuffer", value),
|
324979
|
+
dataView: (value) => assertType(is4.dataView(value), "DataView", value),
|
324980
|
+
enumCase: (value, targetEnum) => assertType(is4.enumCase(value, targetEnum), "EnumCase", value),
|
324981
|
+
urlInstance: (value) => assertType(is4.urlInstance(value), "URL", value),
|
324982
|
+
urlString: (value) => assertType(is4.urlString(value), "string with a URL", value),
|
324983
|
+
truthy: (value) => assertType(is4.truthy(value), "truthy", value),
|
324984
|
+
falsy: (value) => assertType(is4.falsy(value), "falsy", value),
|
324985
|
+
nan: (value) => assertType(is4.nan(value), "NaN", value),
|
324986
|
+
primitive: (value) => assertType(is4.primitive(value), "primitive", value),
|
324987
|
+
integer: (value) => assertType(is4.integer(value), "integer", value),
|
324988
|
+
safeInteger: (value) => assertType(is4.safeInteger(value), "integer", value),
|
324989
|
+
plainObject: (value) => assertType(is4.plainObject(value), "plain object", value),
|
324990
|
+
typedArray: (value) => assertType(is4.typedArray(value), "TypedArray", value),
|
324991
|
+
arrayLike: (value) => assertType(is4.arrayLike(value), "array-like", value),
|
324992
|
+
domElement: (value) => assertType(is4.domElement(value), "HTMLElement", value),
|
324993
|
+
observable: (value) => assertType(is4.observable(value), "Observable", value),
|
324994
|
+
nodeStream: (value) => assertType(is4.nodeStream(value), "Node.js Stream", value),
|
324995
|
+
infinite: (value) => assertType(is4.infinite(value), "infinite number", value),
|
324996
|
+
emptyArray: (value) => assertType(is4.emptyArray(value), "empty array", value),
|
324997
|
+
nonEmptyArray: (value) => assertType(is4.nonEmptyArray(value), "non-empty array", value),
|
324998
|
+
emptyString: (value) => assertType(is4.emptyString(value), "empty string", value),
|
324999
|
+
emptyStringOrWhitespace: (value) => assertType(is4.emptyStringOrWhitespace(value), "empty string or whitespace", value),
|
325000
|
+
nonEmptyString: (value) => assertType(is4.nonEmptyString(value), "non-empty string", value),
|
325001
|
+
nonEmptyStringAndNotWhitespace: (value) => assertType(is4.nonEmptyStringAndNotWhitespace(value), "non-empty string and not whitespace", value),
|
325002
|
+
emptyObject: (value) => assertType(is4.emptyObject(value), "empty object", value),
|
325003
|
+
nonEmptyObject: (value) => assertType(is4.nonEmptyObject(value), "non-empty object", value),
|
325004
|
+
emptySet: (value) => assertType(is4.emptySet(value), "empty set", value),
|
325005
|
+
nonEmptySet: (value) => assertType(is4.nonEmptySet(value), "non-empty set", value),
|
325006
|
+
emptyMap: (value) => assertType(is4.emptyMap(value), "empty map", value),
|
325007
|
+
nonEmptyMap: (value) => assertType(is4.nonEmptyMap(value), "non-empty map", value),
|
325008
|
+
propertyKey: (value) => assertType(is4.propertyKey(value), "PropertyKey", value),
|
325009
|
+
formData: (value) => assertType(is4.formData(value), "FormData", value),
|
325010
|
+
urlSearchParams: (value) => assertType(is4.urlSearchParams(value), "URLSearchParams", value),
|
324659
325011
|
// Numbers.
|
324660
|
-
evenInteger: (value) => assertType(
|
324661
|
-
oddInteger: (value) => assertType(
|
325012
|
+
evenInteger: (value) => assertType(is4.evenInteger(value), "even integer", value),
|
325013
|
+
oddInteger: (value) => assertType(is4.oddInteger(value), "odd integer", value),
|
324662
325014
|
// Two arguments.
|
324663
|
-
directInstanceOf: (instance, class_) => assertType(
|
324664
|
-
inRange: (value, range) => assertType(
|
325015
|
+
directInstanceOf: (instance, class_) => assertType(is4.directInstanceOf(instance, class_), "T", instance),
|
325016
|
+
inRange: (value, range) => assertType(is4.inRange(value, range), "in range", value),
|
324665
325017
|
// Variadic functions.
|
324666
|
-
any: (predicate, ...values) => assertType(
|
324667
|
-
all: (predicate, ...values) => assertType(
|
325018
|
+
any: (predicate, ...values) => assertType(is4.any(predicate, ...values), "predicate returns truthy for any value", values, { multipleValues: true }),
|
325019
|
+
all: (predicate, ...values) => assertType(is4.all(predicate, ...values), "predicate returns truthy for all values", values, { multipleValues: true })
|
324668
325020
|
};
|
324669
|
-
Object.defineProperties(
|
325021
|
+
Object.defineProperties(is4, {
|
324670
325022
|
class: {
|
324671
|
-
value:
|
325023
|
+
value: is4.class_
|
324672
325024
|
},
|
324673
325025
|
function: {
|
324674
|
-
value:
|
325026
|
+
value: is4.function_
|
324675
325027
|
},
|
324676
325028
|
null: {
|
324677
|
-
value:
|
325029
|
+
value: is4.null_
|
324678
325030
|
}
|
324679
325031
|
});
|
324680
325032
|
Object.defineProperties(assert5, {
|
@@ -324688,7 +325040,7 @@ Object.defineProperties(assert5, {
|
|
324688
325040
|
value: assert5.null_
|
324689
325041
|
}
|
324690
325042
|
});
|
324691
|
-
var dist_default5 =
|
325043
|
+
var dist_default5 = is4;
|
324692
325044
|
|
324693
325045
|
// ../../node_modules/got/dist/source/as-promise/index.js
|
324694
325046
|
var import_node_events3 = require("events");
|
@@ -330807,10 +331159,10 @@ var determineDimensions = (text7, options) => {
|
|
330807
331159
|
}
|
330808
331160
|
return options;
|
330809
331161
|
};
|
330810
|
-
var isHex = (
|
330811
|
-
var isColorValid = (
|
330812
|
-
var getColorFn = (
|
330813
|
-
var getBGColorFn = (
|
331162
|
+
var isHex = (color3) => color3.match(/^#(?:[0-f]{3}){1,2}$/i);
|
331163
|
+
var isColorValid = (color3) => typeof color3 === "string" && (source_default7[color3] ?? isHex(color3));
|
331164
|
+
var getColorFn = (color3) => isHex(color3) ? source_default7.hex(color3) : source_default7[color3];
|
331165
|
+
var getBGColorFn = (color3) => isHex(color3) ? source_default7.bgHex(color3) : source_default7[camelCase(["bg", color3])];
|
330814
331166
|
function boxen(text7, options) {
|
330815
331167
|
options = {
|
330816
331168
|
padding: 0,
|