@wemake.cx/sequential-thinking 0.2.10 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +582 -1639
- package/dist/index.js.map +13 -19
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -26,9 +26,8 @@ var __export = (target, all) => {
|
|
|
26
26
|
set: (newValue) => all[name] = () => newValue
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
|
-
var __require = import.meta.require;
|
|
30
29
|
|
|
31
|
-
// ../../node_modules/uri-js/dist/es5/uri.all.js
|
|
30
|
+
// ../../node_modules/.bun/uri-js@4.4.1/node_modules/uri-js/dist/es5/uri.all.js
|
|
32
31
|
var require_uri_all = __commonJS((exports, module) => {
|
|
33
32
|
(function(global, factory) {
|
|
34
33
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : factory(global.URI = global.URI || {});
|
|
@@ -1032,7 +1031,7 @@ var require_uri_all = __commonJS((exports, module) => {
|
|
|
1032
1031
|
});
|
|
1033
1032
|
});
|
|
1034
1033
|
|
|
1035
|
-
// ../../node_modules/fast-deep-equal/index.js
|
|
1034
|
+
// ../../node_modules/.bun/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
|
|
1036
1035
|
var require_fast_deep_equal = __commonJS((exports, module) => {
|
|
1037
1036
|
module.exports = function equal(a, b) {
|
|
1038
1037
|
if (a === b)
|
|
@@ -1074,7 +1073,7 @@ var require_fast_deep_equal = __commonJS((exports, module) => {
|
|
|
1074
1073
|
};
|
|
1075
1074
|
});
|
|
1076
1075
|
|
|
1077
|
-
// ../../node_modules/ajv/lib/compile/ucs2length.js
|
|
1076
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/compile/ucs2length.js
|
|
1078
1077
|
var require_ucs2length = __commonJS((exports, module) => {
|
|
1079
1078
|
module.exports = function ucs2length(str) {
|
|
1080
1079
|
var length = 0, len = str.length, pos = 0, value;
|
|
@@ -1091,7 +1090,7 @@ var require_ucs2length = __commonJS((exports, module) => {
|
|
|
1091
1090
|
};
|
|
1092
1091
|
});
|
|
1093
1092
|
|
|
1094
|
-
// ../../node_modules/ajv/lib/compile/util.js
|
|
1093
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/compile/util.js
|
|
1095
1094
|
var require_util = __commonJS((exports, module) => {
|
|
1096
1095
|
module.exports = {
|
|
1097
1096
|
copy,
|
|
@@ -1294,7 +1293,7 @@ var require_util = __commonJS((exports, module) => {
|
|
|
1294
1293
|
}
|
|
1295
1294
|
});
|
|
1296
1295
|
|
|
1297
|
-
// ../../node_modules/ajv/lib/compile/schema_obj.js
|
|
1296
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/compile/schema_obj.js
|
|
1298
1297
|
var require_schema_obj = __commonJS((exports, module) => {
|
|
1299
1298
|
var util3 = require_util();
|
|
1300
1299
|
module.exports = SchemaObject;
|
|
@@ -1303,7 +1302,7 @@ var require_schema_obj = __commonJS((exports, module) => {
|
|
|
1303
1302
|
}
|
|
1304
1303
|
});
|
|
1305
1304
|
|
|
1306
|
-
// ../../node_modules/json-schema-traverse/index.js
|
|
1305
|
+
// ../../node_modules/.bun/json-schema-traverse@0.4.1/node_modules/json-schema-traverse/index.js
|
|
1307
1306
|
var require_json_schema_traverse = __commonJS((exports, module) => {
|
|
1308
1307
|
var traverse = module.exports = function(schema, opts, cb) {
|
|
1309
1308
|
if (typeof opts == "function") {
|
|
@@ -1382,7 +1381,7 @@ var require_json_schema_traverse = __commonJS((exports, module) => {
|
|
|
1382
1381
|
}
|
|
1383
1382
|
});
|
|
1384
1383
|
|
|
1385
|
-
// ../../node_modules/ajv/lib/compile/resolve.js
|
|
1384
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/compile/resolve.js
|
|
1386
1385
|
var require_resolve = __commonJS((exports, module) => {
|
|
1387
1386
|
var URI = require_uri_all();
|
|
1388
1387
|
var equal = require_fast_deep_equal();
|
|
@@ -1623,7 +1622,7 @@ var require_resolve = __commonJS((exports, module) => {
|
|
|
1623
1622
|
}
|
|
1624
1623
|
});
|
|
1625
1624
|
|
|
1626
|
-
// ../../node_modules/ajv/lib/compile/error_classes.js
|
|
1625
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/compile/error_classes.js
|
|
1627
1626
|
var require_error_classes = __commonJS((exports, module) => {
|
|
1628
1627
|
var resolve = require_resolve();
|
|
1629
1628
|
module.exports = {
|
|
@@ -1650,7 +1649,7 @@ var require_error_classes = __commonJS((exports, module) => {
|
|
|
1650
1649
|
}
|
|
1651
1650
|
});
|
|
1652
1651
|
|
|
1653
|
-
// ../../node_modules/fast-json-stable-stringify/index.js
|
|
1652
|
+
// ../../node_modules/.bun/fast-json-stable-stringify@2.1.0/node_modules/fast-json-stable-stringify/index.js
|
|
1654
1653
|
var require_fast_json_stable_stringify = __commonJS((exports, module) => {
|
|
1655
1654
|
module.exports = function(data, opts) {
|
|
1656
1655
|
if (!opts)
|
|
@@ -1713,7 +1712,7 @@ var require_fast_json_stable_stringify = __commonJS((exports, module) => {
|
|
|
1713
1712
|
};
|
|
1714
1713
|
});
|
|
1715
1714
|
|
|
1716
|
-
// ../../node_modules/ajv/lib/dotjs/validate.js
|
|
1715
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/validate.js
|
|
1717
1716
|
var require_validate = __commonJS((exports, module) => {
|
|
1718
1717
|
module.exports = function generate_validate(it, $keyword, $ruleType) {
|
|
1719
1718
|
var out = "";
|
|
@@ -2181,7 +2180,7 @@ var require_validate = __commonJS((exports, module) => {
|
|
|
2181
2180
|
};
|
|
2182
2181
|
});
|
|
2183
2182
|
|
|
2184
|
-
// ../../node_modules/ajv/lib/compile/index.js
|
|
2183
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/compile/index.js
|
|
2185
2184
|
var require_compile = __commonJS((exports, module) => {
|
|
2186
2185
|
var resolve = require_resolve();
|
|
2187
2186
|
var util3 = require_util();
|
|
@@ -2447,7 +2446,7 @@ var require_compile = __commonJS((exports, module) => {
|
|
|
2447
2446
|
}
|
|
2448
2447
|
});
|
|
2449
2448
|
|
|
2450
|
-
// ../../node_modules/ajv/lib/cache.js
|
|
2449
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/cache.js
|
|
2451
2450
|
var require_cache = __commonJS((exports, module) => {
|
|
2452
2451
|
var Cache = module.exports = function Cache() {
|
|
2453
2452
|
this._cache = {};
|
|
@@ -2466,7 +2465,7 @@ var require_cache = __commonJS((exports, module) => {
|
|
|
2466
2465
|
};
|
|
2467
2466
|
});
|
|
2468
2467
|
|
|
2469
|
-
// ../../node_modules/ajv/lib/compile/formats.js
|
|
2468
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/compile/formats.js
|
|
2470
2469
|
var require_formats = __commonJS((exports, module) => {
|
|
2471
2470
|
var util3 = require_util();
|
|
2472
2471
|
var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
|
@@ -2566,7 +2565,7 @@ var require_formats = __commonJS((exports, module) => {
|
|
|
2566
2565
|
}
|
|
2567
2566
|
});
|
|
2568
2567
|
|
|
2569
|
-
// ../../node_modules/ajv/lib/dotjs/ref.js
|
|
2568
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/ref.js
|
|
2570
2569
|
var require_ref = __commonJS((exports, module) => {
|
|
2571
2570
|
module.exports = function generate_ref(it, $keyword, $ruleType) {
|
|
2572
2571
|
var out = " ";
|
|
@@ -2692,7 +2691,7 @@ var require_ref = __commonJS((exports, module) => {
|
|
|
2692
2691
|
};
|
|
2693
2692
|
});
|
|
2694
2693
|
|
|
2695
|
-
// ../../node_modules/ajv/lib/dotjs/allOf.js
|
|
2694
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/allOf.js
|
|
2696
2695
|
var require_allOf = __commonJS((exports, module) => {
|
|
2697
2696
|
module.exports = function generate_allOf(it, $keyword, $ruleType) {
|
|
2698
2697
|
var out = " ";
|
|
@@ -2735,7 +2734,7 @@ var require_allOf = __commonJS((exports, module) => {
|
|
|
2735
2734
|
};
|
|
2736
2735
|
});
|
|
2737
2736
|
|
|
2738
|
-
// ../../node_modules/ajv/lib/dotjs/anyOf.js
|
|
2737
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/anyOf.js
|
|
2739
2738
|
var require_anyOf = __commonJS((exports, module) => {
|
|
2740
2739
|
module.exports = function generate_anyOf(it, $keyword, $ruleType) {
|
|
2741
2740
|
var out = " ";
|
|
@@ -2809,7 +2808,7 @@ var require_anyOf = __commonJS((exports, module) => {
|
|
|
2809
2808
|
};
|
|
2810
2809
|
});
|
|
2811
2810
|
|
|
2812
|
-
// ../../node_modules/ajv/lib/dotjs/comment.js
|
|
2811
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/comment.js
|
|
2813
2812
|
var require_comment = __commonJS((exports, module) => {
|
|
2814
2813
|
module.exports = function generate_comment(it, $keyword, $ruleType) {
|
|
2815
2814
|
var out = " ";
|
|
@@ -2826,7 +2825,7 @@ var require_comment = __commonJS((exports, module) => {
|
|
|
2826
2825
|
};
|
|
2827
2826
|
});
|
|
2828
2827
|
|
|
2829
|
-
// ../../node_modules/ajv/lib/dotjs/const.js
|
|
2828
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/const.js
|
|
2830
2829
|
var require_const = __commonJS((exports, module) => {
|
|
2831
2830
|
module.exports = function generate_const(it, $keyword, $ruleType) {
|
|
2832
2831
|
var out = " ";
|
|
@@ -2883,7 +2882,7 @@ var require_const = __commonJS((exports, module) => {
|
|
|
2883
2882
|
};
|
|
2884
2883
|
});
|
|
2885
2884
|
|
|
2886
|
-
// ../../node_modules/ajv/lib/dotjs/contains.js
|
|
2885
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/contains.js
|
|
2887
2886
|
var require_contains = __commonJS((exports, module) => {
|
|
2888
2887
|
module.exports = function generate_contains(it, $keyword, $ruleType) {
|
|
2889
2888
|
var out = " ";
|
|
@@ -2962,7 +2961,7 @@ var require_contains = __commonJS((exports, module) => {
|
|
|
2962
2961
|
};
|
|
2963
2962
|
});
|
|
2964
2963
|
|
|
2965
|
-
// ../../node_modules/ajv/lib/dotjs/dependencies.js
|
|
2964
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/dependencies.js
|
|
2966
2965
|
var require_dependencies = __commonJS((exports, module) => {
|
|
2967
2966
|
module.exports = function generate_dependencies(it, $keyword, $ruleType) {
|
|
2968
2967
|
var out = " ";
|
|
@@ -3125,7 +3124,7 @@ var require_dependencies = __commonJS((exports, module) => {
|
|
|
3125
3124
|
};
|
|
3126
3125
|
});
|
|
3127
3126
|
|
|
3128
|
-
// ../../node_modules/ajv/lib/dotjs/enum.js
|
|
3127
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/enum.js
|
|
3129
3128
|
var require_enum = __commonJS((exports, module) => {
|
|
3130
3129
|
module.exports = function generate_enum(it, $keyword, $ruleType) {
|
|
3131
3130
|
var out = " ";
|
|
@@ -3191,7 +3190,7 @@ var require_enum = __commonJS((exports, module) => {
|
|
|
3191
3190
|
};
|
|
3192
3191
|
});
|
|
3193
3192
|
|
|
3194
|
-
// ../../node_modules/ajv/lib/dotjs/format.js
|
|
3193
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/format.js
|
|
3195
3194
|
var require_format = __commonJS((exports, module) => {
|
|
3196
3195
|
module.exports = function generate_format(it, $keyword, $ruleType) {
|
|
3197
3196
|
var out = " ";
|
|
@@ -3341,7 +3340,7 @@ var require_format = __commonJS((exports, module) => {
|
|
|
3341
3340
|
};
|
|
3342
3341
|
});
|
|
3343
3342
|
|
|
3344
|
-
// ../../node_modules/ajv/lib/dotjs/if.js
|
|
3343
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/if.js
|
|
3345
3344
|
var require_if = __commonJS((exports, module) => {
|
|
3346
3345
|
module.exports = function generate_if(it, $keyword, $ruleType) {
|
|
3347
3346
|
var out = " ";
|
|
@@ -3442,7 +3441,7 @@ var require_if = __commonJS((exports, module) => {
|
|
|
3442
3441
|
};
|
|
3443
3442
|
});
|
|
3444
3443
|
|
|
3445
|
-
// ../../node_modules/ajv/lib/dotjs/items.js
|
|
3444
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/items.js
|
|
3446
3445
|
var require_items = __commonJS((exports, module) => {
|
|
3447
3446
|
module.exports = function generate_items(it, $keyword, $ruleType) {
|
|
3448
3447
|
var out = " ";
|
|
@@ -3580,7 +3579,7 @@ var require_items = __commonJS((exports, module) => {
|
|
|
3580
3579
|
};
|
|
3581
3580
|
});
|
|
3582
3581
|
|
|
3583
|
-
// ../../node_modules/ajv/lib/dotjs/_limit.js
|
|
3582
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limit.js
|
|
3584
3583
|
var require__limit = __commonJS((exports, module) => {
|
|
3585
3584
|
module.exports = function generate__limit(it, $keyword, $ruleType) {
|
|
3586
3585
|
var out = " ";
|
|
@@ -3732,7 +3731,7 @@ var require__limit = __commonJS((exports, module) => {
|
|
|
3732
3731
|
};
|
|
3733
3732
|
});
|
|
3734
3733
|
|
|
3735
|
-
// ../../node_modules/ajv/lib/dotjs/_limitItems.js
|
|
3734
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitItems.js
|
|
3736
3735
|
var require__limitItems = __commonJS((exports, module) => {
|
|
3737
3736
|
module.exports = function generate__limitItems(it, $keyword, $ruleType) {
|
|
3738
3737
|
var out = " ";
|
|
@@ -3813,7 +3812,7 @@ var require__limitItems = __commonJS((exports, module) => {
|
|
|
3813
3812
|
};
|
|
3814
3813
|
});
|
|
3815
3814
|
|
|
3816
|
-
// ../../node_modules/ajv/lib/dotjs/_limitLength.js
|
|
3815
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitLength.js
|
|
3817
3816
|
var require__limitLength = __commonJS((exports, module) => {
|
|
3818
3817
|
module.exports = function generate__limitLength(it, $keyword, $ruleType) {
|
|
3819
3818
|
var out = " ";
|
|
@@ -3899,7 +3898,7 @@ var require__limitLength = __commonJS((exports, module) => {
|
|
|
3899
3898
|
};
|
|
3900
3899
|
});
|
|
3901
3900
|
|
|
3902
|
-
// ../../node_modules/ajv/lib/dotjs/_limitProperties.js
|
|
3901
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/_limitProperties.js
|
|
3903
3902
|
var require__limitProperties = __commonJS((exports, module) => {
|
|
3904
3903
|
module.exports = function generate__limitProperties(it, $keyword, $ruleType) {
|
|
3905
3904
|
var out = " ";
|
|
@@ -3980,7 +3979,7 @@ var require__limitProperties = __commonJS((exports, module) => {
|
|
|
3980
3979
|
};
|
|
3981
3980
|
});
|
|
3982
3981
|
|
|
3983
|
-
// ../../node_modules/ajv/lib/dotjs/multipleOf.js
|
|
3982
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/multipleOf.js
|
|
3984
3983
|
var require_multipleOf = __commonJS((exports, module) => {
|
|
3985
3984
|
module.exports = function generate_multipleOf(it, $keyword, $ruleType) {
|
|
3986
3985
|
var out = " ";
|
|
@@ -4061,7 +4060,7 @@ var require_multipleOf = __commonJS((exports, module) => {
|
|
|
4061
4060
|
};
|
|
4062
4061
|
});
|
|
4063
4062
|
|
|
4064
|
-
// ../../node_modules/ajv/lib/dotjs/not.js
|
|
4063
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/not.js
|
|
4065
4064
|
var require_not = __commonJS((exports, module) => {
|
|
4066
4065
|
module.exports = function generate_not(it, $keyword, $ruleType) {
|
|
4067
4066
|
var out = " ";
|
|
@@ -4148,7 +4147,7 @@ var require_not = __commonJS((exports, module) => {
|
|
|
4148
4147
|
};
|
|
4149
4148
|
});
|
|
4150
4149
|
|
|
4151
|
-
// ../../node_modules/ajv/lib/dotjs/oneOf.js
|
|
4150
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/oneOf.js
|
|
4152
4151
|
var require_oneOf = __commonJS((exports, module) => {
|
|
4153
4152
|
module.exports = function generate_oneOf(it, $keyword, $ruleType) {
|
|
4154
4153
|
var out = " ";
|
|
@@ -4220,7 +4219,7 @@ var require_oneOf = __commonJS((exports, module) => {
|
|
|
4220
4219
|
};
|
|
4221
4220
|
});
|
|
4222
4221
|
|
|
4223
|
-
// ../../node_modules/ajv/lib/dotjs/pattern.js
|
|
4222
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/pattern.js
|
|
4224
4223
|
var require_pattern = __commonJS((exports, module) => {
|
|
4225
4224
|
module.exports = function generate_pattern(it, $keyword, $ruleType) {
|
|
4226
4225
|
var out = " ";
|
|
@@ -4296,7 +4295,7 @@ var require_pattern = __commonJS((exports, module) => {
|
|
|
4296
4295
|
};
|
|
4297
4296
|
});
|
|
4298
4297
|
|
|
4299
|
-
// ../../node_modules/ajv/lib/dotjs/properties.js
|
|
4298
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/properties.js
|
|
4300
4299
|
var require_properties = __commonJS((exports, module) => {
|
|
4301
4300
|
module.exports = function generate_properties(it, $keyword, $ruleType) {
|
|
4302
4301
|
var out = " ";
|
|
@@ -4609,7 +4608,7 @@ var require_properties = __commonJS((exports, module) => {
|
|
|
4609
4608
|
};
|
|
4610
4609
|
});
|
|
4611
4610
|
|
|
4612
|
-
// ../../node_modules/ajv/lib/dotjs/propertyNames.js
|
|
4611
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/propertyNames.js
|
|
4613
4612
|
var require_propertyNames = __commonJS((exports, module) => {
|
|
4614
4613
|
module.exports = function generate_propertyNames(it, $keyword, $ruleType) {
|
|
4615
4614
|
var out = " ";
|
|
@@ -4684,7 +4683,7 @@ var require_propertyNames = __commonJS((exports, module) => {
|
|
|
4684
4683
|
};
|
|
4685
4684
|
});
|
|
4686
4685
|
|
|
4687
|
-
// ../../node_modules/ajv/lib/dotjs/required.js
|
|
4686
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/required.js
|
|
4688
4687
|
var require_required = __commonJS((exports, module) => {
|
|
4689
4688
|
module.exports = function generate_required(it, $keyword, $ruleType) {
|
|
4690
4689
|
var out = " ";
|
|
@@ -4941,7 +4940,7 @@ var require_required = __commonJS((exports, module) => {
|
|
|
4941
4940
|
};
|
|
4942
4941
|
});
|
|
4943
4942
|
|
|
4944
|
-
// ../../node_modules/ajv/lib/dotjs/uniqueItems.js
|
|
4943
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/uniqueItems.js
|
|
4945
4944
|
var require_uniqueItems = __commonJS((exports, module) => {
|
|
4946
4945
|
module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
|
|
4947
4946
|
var out = " ";
|
|
@@ -5027,7 +5026,7 @@ var require_uniqueItems = __commonJS((exports, module) => {
|
|
|
5027
5026
|
};
|
|
5028
5027
|
});
|
|
5029
5028
|
|
|
5030
|
-
// ../../node_modules/ajv/lib/dotjs/index.js
|
|
5029
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/index.js
|
|
5031
5030
|
var require_dotjs = __commonJS((exports, module) => {
|
|
5032
5031
|
module.exports = {
|
|
5033
5032
|
$ref: require_ref(),
|
|
@@ -5061,7 +5060,7 @@ var require_dotjs = __commonJS((exports, module) => {
|
|
|
5061
5060
|
};
|
|
5062
5061
|
});
|
|
5063
5062
|
|
|
5064
|
-
// ../../node_modules/ajv/lib/compile/rules.js
|
|
5063
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/compile/rules.js
|
|
5065
5064
|
var require_rules = __commonJS((exports, module) => {
|
|
5066
5065
|
var ruleModules = require_dotjs();
|
|
5067
5066
|
var toHash = require_util().toHash;
|
|
@@ -5153,7 +5152,7 @@ var require_rules = __commonJS((exports, module) => {
|
|
|
5153
5152
|
};
|
|
5154
5153
|
});
|
|
5155
5154
|
|
|
5156
|
-
// ../../node_modules/ajv/lib/data.js
|
|
5155
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/data.js
|
|
5157
5156
|
var require_data = __commonJS((exports, module) => {
|
|
5158
5157
|
var KEYWORDS = [
|
|
5159
5158
|
"multipleOf",
|
|
@@ -5201,7 +5200,7 @@ var require_data = __commonJS((exports, module) => {
|
|
|
5201
5200
|
};
|
|
5202
5201
|
});
|
|
5203
5202
|
|
|
5204
|
-
// ../../node_modules/ajv/lib/compile/async.js
|
|
5203
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/compile/async.js
|
|
5205
5204
|
var require_async = __commonJS((exports, module) => {
|
|
5206
5205
|
var MissingRefError = require_error_classes().MissingRef;
|
|
5207
5206
|
module.exports = compileAsync;
|
|
@@ -5265,7 +5264,7 @@ var require_async = __commonJS((exports, module) => {
|
|
|
5265
5264
|
}
|
|
5266
5265
|
});
|
|
5267
5266
|
|
|
5268
|
-
// ../../node_modules/ajv/lib/dotjs/custom.js
|
|
5267
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/dotjs/custom.js
|
|
5269
5268
|
var require_custom = __commonJS((exports, module) => {
|
|
5270
5269
|
module.exports = function generate_custom(it, $keyword, $ruleType) {
|
|
5271
5270
|
var out = " ";
|
|
@@ -5488,7 +5487,7 @@ var require_custom = __commonJS((exports, module) => {
|
|
|
5488
5487
|
};
|
|
5489
5488
|
});
|
|
5490
5489
|
|
|
5491
|
-
// ../../node_modules/ajv/lib/refs/json-schema-draft-07.json
|
|
5490
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/refs/json-schema-draft-07.json
|
|
5492
5491
|
var require_json_schema_draft_07 = __commonJS((exports, module) => {
|
|
5493
5492
|
module.exports = {
|
|
5494
5493
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
@@ -5660,7 +5659,7 @@ var require_json_schema_draft_07 = __commonJS((exports, module) => {
|
|
|
5660
5659
|
};
|
|
5661
5660
|
});
|
|
5662
5661
|
|
|
5663
|
-
// ../../node_modules/ajv/lib/definition_schema.js
|
|
5662
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/definition_schema.js
|
|
5664
5663
|
var require_definition_schema = __commonJS((exports, module) => {
|
|
5665
5664
|
var metaSchema = require_json_schema_draft_07();
|
|
5666
5665
|
module.exports = {
|
|
@@ -5698,7 +5697,7 @@ var require_definition_schema = __commonJS((exports, module) => {
|
|
|
5698
5697
|
};
|
|
5699
5698
|
});
|
|
5700
5699
|
|
|
5701
|
-
// ../../node_modules/ajv/lib/keyword.js
|
|
5700
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/keyword.js
|
|
5702
5701
|
var require_keyword = __commonJS((exports, module) => {
|
|
5703
5702
|
var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
|
|
5704
5703
|
var customRuleCode = require_custom();
|
|
@@ -5796,7 +5795,7 @@ var require_keyword = __commonJS((exports, module) => {
|
|
|
5796
5795
|
}
|
|
5797
5796
|
});
|
|
5798
5797
|
|
|
5799
|
-
// ../../node_modules/ajv/lib/refs/data.json
|
|
5798
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/refs/data.json
|
|
5800
5799
|
var require_data2 = __commonJS((exports, module) => {
|
|
5801
5800
|
module.exports = {
|
|
5802
5801
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
@@ -5817,7 +5816,7 @@ var require_data2 = __commonJS((exports, module) => {
|
|
|
5817
5816
|
};
|
|
5818
5817
|
});
|
|
5819
5818
|
|
|
5820
|
-
// ../../node_modules/ajv/lib/ajv.js
|
|
5819
|
+
// ../../node_modules/.bun/ajv@6.12.6/node_modules/ajv/lib/ajv.js
|
|
5821
5820
|
var require_ajv = __commonJS((exports, module) => {
|
|
5822
5821
|
var compileSchema = require_compile();
|
|
5823
5822
|
var resolve = require_resolve();
|
|
@@ -6195,1524 +6194,7 @@ var require_ajv = __commonJS((exports, module) => {
|
|
|
6195
6194
|
function noop() {}
|
|
6196
6195
|
});
|
|
6197
6196
|
|
|
6198
|
-
// ../../node_modules/
|
|
6199
|
-
var require_color_name = __commonJS((exports, module) => {
|
|
6200
|
-
module.exports = {
|
|
6201
|
-
aliceblue: [240, 248, 255],
|
|
6202
|
-
antiquewhite: [250, 235, 215],
|
|
6203
|
-
aqua: [0, 255, 255],
|
|
6204
|
-
aquamarine: [127, 255, 212],
|
|
6205
|
-
azure: [240, 255, 255],
|
|
6206
|
-
beige: [245, 245, 220],
|
|
6207
|
-
bisque: [255, 228, 196],
|
|
6208
|
-
black: [0, 0, 0],
|
|
6209
|
-
blanchedalmond: [255, 235, 205],
|
|
6210
|
-
blue: [0, 0, 255],
|
|
6211
|
-
blueviolet: [138, 43, 226],
|
|
6212
|
-
brown: [165, 42, 42],
|
|
6213
|
-
burlywood: [222, 184, 135],
|
|
6214
|
-
cadetblue: [95, 158, 160],
|
|
6215
|
-
chartreuse: [127, 255, 0],
|
|
6216
|
-
chocolate: [210, 105, 30],
|
|
6217
|
-
coral: [255, 127, 80],
|
|
6218
|
-
cornflowerblue: [100, 149, 237],
|
|
6219
|
-
cornsilk: [255, 248, 220],
|
|
6220
|
-
crimson: [220, 20, 60],
|
|
6221
|
-
cyan: [0, 255, 255],
|
|
6222
|
-
darkblue: [0, 0, 139],
|
|
6223
|
-
darkcyan: [0, 139, 139],
|
|
6224
|
-
darkgoldenrod: [184, 134, 11],
|
|
6225
|
-
darkgray: [169, 169, 169],
|
|
6226
|
-
darkgreen: [0, 100, 0],
|
|
6227
|
-
darkgrey: [169, 169, 169],
|
|
6228
|
-
darkkhaki: [189, 183, 107],
|
|
6229
|
-
darkmagenta: [139, 0, 139],
|
|
6230
|
-
darkolivegreen: [85, 107, 47],
|
|
6231
|
-
darkorange: [255, 140, 0],
|
|
6232
|
-
darkorchid: [153, 50, 204],
|
|
6233
|
-
darkred: [139, 0, 0],
|
|
6234
|
-
darksalmon: [233, 150, 122],
|
|
6235
|
-
darkseagreen: [143, 188, 143],
|
|
6236
|
-
darkslateblue: [72, 61, 139],
|
|
6237
|
-
darkslategray: [47, 79, 79],
|
|
6238
|
-
darkslategrey: [47, 79, 79],
|
|
6239
|
-
darkturquoise: [0, 206, 209],
|
|
6240
|
-
darkviolet: [148, 0, 211],
|
|
6241
|
-
deeppink: [255, 20, 147],
|
|
6242
|
-
deepskyblue: [0, 191, 255],
|
|
6243
|
-
dimgray: [105, 105, 105],
|
|
6244
|
-
dimgrey: [105, 105, 105],
|
|
6245
|
-
dodgerblue: [30, 144, 255],
|
|
6246
|
-
firebrick: [178, 34, 34],
|
|
6247
|
-
floralwhite: [255, 250, 240],
|
|
6248
|
-
forestgreen: [34, 139, 34],
|
|
6249
|
-
fuchsia: [255, 0, 255],
|
|
6250
|
-
gainsboro: [220, 220, 220],
|
|
6251
|
-
ghostwhite: [248, 248, 255],
|
|
6252
|
-
gold: [255, 215, 0],
|
|
6253
|
-
goldenrod: [218, 165, 32],
|
|
6254
|
-
gray: [128, 128, 128],
|
|
6255
|
-
green: [0, 128, 0],
|
|
6256
|
-
greenyellow: [173, 255, 47],
|
|
6257
|
-
grey: [128, 128, 128],
|
|
6258
|
-
honeydew: [240, 255, 240],
|
|
6259
|
-
hotpink: [255, 105, 180],
|
|
6260
|
-
indianred: [205, 92, 92],
|
|
6261
|
-
indigo: [75, 0, 130],
|
|
6262
|
-
ivory: [255, 255, 240],
|
|
6263
|
-
khaki: [240, 230, 140],
|
|
6264
|
-
lavender: [230, 230, 250],
|
|
6265
|
-
lavenderblush: [255, 240, 245],
|
|
6266
|
-
lawngreen: [124, 252, 0],
|
|
6267
|
-
lemonchiffon: [255, 250, 205],
|
|
6268
|
-
lightblue: [173, 216, 230],
|
|
6269
|
-
lightcoral: [240, 128, 128],
|
|
6270
|
-
lightcyan: [224, 255, 255],
|
|
6271
|
-
lightgoldenrodyellow: [250, 250, 210],
|
|
6272
|
-
lightgray: [211, 211, 211],
|
|
6273
|
-
lightgreen: [144, 238, 144],
|
|
6274
|
-
lightgrey: [211, 211, 211],
|
|
6275
|
-
lightpink: [255, 182, 193],
|
|
6276
|
-
lightsalmon: [255, 160, 122],
|
|
6277
|
-
lightseagreen: [32, 178, 170],
|
|
6278
|
-
lightskyblue: [135, 206, 250],
|
|
6279
|
-
lightslategray: [119, 136, 153],
|
|
6280
|
-
lightslategrey: [119, 136, 153],
|
|
6281
|
-
lightsteelblue: [176, 196, 222],
|
|
6282
|
-
lightyellow: [255, 255, 224],
|
|
6283
|
-
lime: [0, 255, 0],
|
|
6284
|
-
limegreen: [50, 205, 50],
|
|
6285
|
-
linen: [250, 240, 230],
|
|
6286
|
-
magenta: [255, 0, 255],
|
|
6287
|
-
maroon: [128, 0, 0],
|
|
6288
|
-
mediumaquamarine: [102, 205, 170],
|
|
6289
|
-
mediumblue: [0, 0, 205],
|
|
6290
|
-
mediumorchid: [186, 85, 211],
|
|
6291
|
-
mediumpurple: [147, 112, 219],
|
|
6292
|
-
mediumseagreen: [60, 179, 113],
|
|
6293
|
-
mediumslateblue: [123, 104, 238],
|
|
6294
|
-
mediumspringgreen: [0, 250, 154],
|
|
6295
|
-
mediumturquoise: [72, 209, 204],
|
|
6296
|
-
mediumvioletred: [199, 21, 133],
|
|
6297
|
-
midnightblue: [25, 25, 112],
|
|
6298
|
-
mintcream: [245, 255, 250],
|
|
6299
|
-
mistyrose: [255, 228, 225],
|
|
6300
|
-
moccasin: [255, 228, 181],
|
|
6301
|
-
navajowhite: [255, 222, 173],
|
|
6302
|
-
navy: [0, 0, 128],
|
|
6303
|
-
oldlace: [253, 245, 230],
|
|
6304
|
-
olive: [128, 128, 0],
|
|
6305
|
-
olivedrab: [107, 142, 35],
|
|
6306
|
-
orange: [255, 165, 0],
|
|
6307
|
-
orangered: [255, 69, 0],
|
|
6308
|
-
orchid: [218, 112, 214],
|
|
6309
|
-
palegoldenrod: [238, 232, 170],
|
|
6310
|
-
palegreen: [152, 251, 152],
|
|
6311
|
-
paleturquoise: [175, 238, 238],
|
|
6312
|
-
palevioletred: [219, 112, 147],
|
|
6313
|
-
papayawhip: [255, 239, 213],
|
|
6314
|
-
peachpuff: [255, 218, 185],
|
|
6315
|
-
peru: [205, 133, 63],
|
|
6316
|
-
pink: [255, 192, 203],
|
|
6317
|
-
plum: [221, 160, 221],
|
|
6318
|
-
powderblue: [176, 224, 230],
|
|
6319
|
-
purple: [128, 0, 128],
|
|
6320
|
-
rebeccapurple: [102, 51, 153],
|
|
6321
|
-
red: [255, 0, 0],
|
|
6322
|
-
rosybrown: [188, 143, 143],
|
|
6323
|
-
royalblue: [65, 105, 225],
|
|
6324
|
-
saddlebrown: [139, 69, 19],
|
|
6325
|
-
salmon: [250, 128, 114],
|
|
6326
|
-
sandybrown: [244, 164, 96],
|
|
6327
|
-
seagreen: [46, 139, 87],
|
|
6328
|
-
seashell: [255, 245, 238],
|
|
6329
|
-
sienna: [160, 82, 45],
|
|
6330
|
-
silver: [192, 192, 192],
|
|
6331
|
-
skyblue: [135, 206, 235],
|
|
6332
|
-
slateblue: [106, 90, 205],
|
|
6333
|
-
slategray: [112, 128, 144],
|
|
6334
|
-
slategrey: [112, 128, 144],
|
|
6335
|
-
snow: [255, 250, 250],
|
|
6336
|
-
springgreen: [0, 255, 127],
|
|
6337
|
-
steelblue: [70, 130, 180],
|
|
6338
|
-
tan: [210, 180, 140],
|
|
6339
|
-
teal: [0, 128, 128],
|
|
6340
|
-
thistle: [216, 191, 216],
|
|
6341
|
-
tomato: [255, 99, 71],
|
|
6342
|
-
turquoise: [64, 224, 208],
|
|
6343
|
-
violet: [238, 130, 238],
|
|
6344
|
-
wheat: [245, 222, 179],
|
|
6345
|
-
white: [255, 255, 255],
|
|
6346
|
-
whitesmoke: [245, 245, 245],
|
|
6347
|
-
yellow: [255, 255, 0],
|
|
6348
|
-
yellowgreen: [154, 205, 50]
|
|
6349
|
-
};
|
|
6350
|
-
});
|
|
6351
|
-
|
|
6352
|
-
// ../../node_modules/color-convert/conversions.js
|
|
6353
|
-
var require_conversions = __commonJS((exports, module) => {
|
|
6354
|
-
var cssKeywords = require_color_name();
|
|
6355
|
-
var reverseKeywords = {};
|
|
6356
|
-
for (const key of Object.keys(cssKeywords)) {
|
|
6357
|
-
reverseKeywords[cssKeywords[key]] = key;
|
|
6358
|
-
}
|
|
6359
|
-
var convert = {
|
|
6360
|
-
rgb: { channels: 3, labels: "rgb" },
|
|
6361
|
-
hsl: { channels: 3, labels: "hsl" },
|
|
6362
|
-
hsv: { channels: 3, labels: "hsv" },
|
|
6363
|
-
hwb: { channels: 3, labels: "hwb" },
|
|
6364
|
-
cmyk: { channels: 4, labels: "cmyk" },
|
|
6365
|
-
xyz: { channels: 3, labels: "xyz" },
|
|
6366
|
-
lab: { channels: 3, labels: "lab" },
|
|
6367
|
-
lch: { channels: 3, labels: "lch" },
|
|
6368
|
-
hex: { channels: 1, labels: ["hex"] },
|
|
6369
|
-
keyword: { channels: 1, labels: ["keyword"] },
|
|
6370
|
-
ansi16: { channels: 1, labels: ["ansi16"] },
|
|
6371
|
-
ansi256: { channels: 1, labels: ["ansi256"] },
|
|
6372
|
-
hcg: { channels: 3, labels: ["h", "c", "g"] },
|
|
6373
|
-
apple: { channels: 3, labels: ["r16", "g16", "b16"] },
|
|
6374
|
-
gray: { channels: 1, labels: ["gray"] }
|
|
6375
|
-
};
|
|
6376
|
-
module.exports = convert;
|
|
6377
|
-
for (const model of Object.keys(convert)) {
|
|
6378
|
-
if (!("channels" in convert[model])) {
|
|
6379
|
-
throw new Error("missing channels property: " + model);
|
|
6380
|
-
}
|
|
6381
|
-
if (!("labels" in convert[model])) {
|
|
6382
|
-
throw new Error("missing channel labels property: " + model);
|
|
6383
|
-
}
|
|
6384
|
-
if (convert[model].labels.length !== convert[model].channels) {
|
|
6385
|
-
throw new Error("channel and label counts mismatch: " + model);
|
|
6386
|
-
}
|
|
6387
|
-
const { channels, labels } = convert[model];
|
|
6388
|
-
delete convert[model].channels;
|
|
6389
|
-
delete convert[model].labels;
|
|
6390
|
-
Object.defineProperty(convert[model], "channels", { value: channels });
|
|
6391
|
-
Object.defineProperty(convert[model], "labels", { value: labels });
|
|
6392
|
-
}
|
|
6393
|
-
convert.rgb.hsl = function(rgb) {
|
|
6394
|
-
const r = rgb[0] / 255;
|
|
6395
|
-
const g = rgb[1] / 255;
|
|
6396
|
-
const b = rgb[2] / 255;
|
|
6397
|
-
const min = Math.min(r, g, b);
|
|
6398
|
-
const max = Math.max(r, g, b);
|
|
6399
|
-
const delta = max - min;
|
|
6400
|
-
let h;
|
|
6401
|
-
let s;
|
|
6402
|
-
if (max === min) {
|
|
6403
|
-
h = 0;
|
|
6404
|
-
} else if (r === max) {
|
|
6405
|
-
h = (g - b) / delta;
|
|
6406
|
-
} else if (g === max) {
|
|
6407
|
-
h = 2 + (b - r) / delta;
|
|
6408
|
-
} else if (b === max) {
|
|
6409
|
-
h = 4 + (r - g) / delta;
|
|
6410
|
-
}
|
|
6411
|
-
h = Math.min(h * 60, 360);
|
|
6412
|
-
if (h < 0) {
|
|
6413
|
-
h += 360;
|
|
6414
|
-
}
|
|
6415
|
-
const l = (min + max) / 2;
|
|
6416
|
-
if (max === min) {
|
|
6417
|
-
s = 0;
|
|
6418
|
-
} else if (l <= 0.5) {
|
|
6419
|
-
s = delta / (max + min);
|
|
6420
|
-
} else {
|
|
6421
|
-
s = delta / (2 - max - min);
|
|
6422
|
-
}
|
|
6423
|
-
return [h, s * 100, l * 100];
|
|
6424
|
-
};
|
|
6425
|
-
convert.rgb.hsv = function(rgb) {
|
|
6426
|
-
let rdif;
|
|
6427
|
-
let gdif;
|
|
6428
|
-
let bdif;
|
|
6429
|
-
let h;
|
|
6430
|
-
let s;
|
|
6431
|
-
const r = rgb[0] / 255;
|
|
6432
|
-
const g = rgb[1] / 255;
|
|
6433
|
-
const b = rgb[2] / 255;
|
|
6434
|
-
const v = Math.max(r, g, b);
|
|
6435
|
-
const diff = v - Math.min(r, g, b);
|
|
6436
|
-
const diffc = function(c) {
|
|
6437
|
-
return (v - c) / 6 / diff + 1 / 2;
|
|
6438
|
-
};
|
|
6439
|
-
if (diff === 0) {
|
|
6440
|
-
h = 0;
|
|
6441
|
-
s = 0;
|
|
6442
|
-
} else {
|
|
6443
|
-
s = diff / v;
|
|
6444
|
-
rdif = diffc(r);
|
|
6445
|
-
gdif = diffc(g);
|
|
6446
|
-
bdif = diffc(b);
|
|
6447
|
-
if (r === v) {
|
|
6448
|
-
h = bdif - gdif;
|
|
6449
|
-
} else if (g === v) {
|
|
6450
|
-
h = 1 / 3 + rdif - bdif;
|
|
6451
|
-
} else if (b === v) {
|
|
6452
|
-
h = 2 / 3 + gdif - rdif;
|
|
6453
|
-
}
|
|
6454
|
-
if (h < 0) {
|
|
6455
|
-
h += 1;
|
|
6456
|
-
} else if (h > 1) {
|
|
6457
|
-
h -= 1;
|
|
6458
|
-
}
|
|
6459
|
-
}
|
|
6460
|
-
return [
|
|
6461
|
-
h * 360,
|
|
6462
|
-
s * 100,
|
|
6463
|
-
v * 100
|
|
6464
|
-
];
|
|
6465
|
-
};
|
|
6466
|
-
convert.rgb.hwb = function(rgb) {
|
|
6467
|
-
const r = rgb[0];
|
|
6468
|
-
const g = rgb[1];
|
|
6469
|
-
let b = rgb[2];
|
|
6470
|
-
const h = convert.rgb.hsl(rgb)[0];
|
|
6471
|
-
const w = 1 / 255 * Math.min(r, Math.min(g, b));
|
|
6472
|
-
b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
|
|
6473
|
-
return [h, w * 100, b * 100];
|
|
6474
|
-
};
|
|
6475
|
-
convert.rgb.cmyk = function(rgb) {
|
|
6476
|
-
const r = rgb[0] / 255;
|
|
6477
|
-
const g = rgb[1] / 255;
|
|
6478
|
-
const b = rgb[2] / 255;
|
|
6479
|
-
const k = Math.min(1 - r, 1 - g, 1 - b);
|
|
6480
|
-
const c = (1 - r - k) / (1 - k) || 0;
|
|
6481
|
-
const m = (1 - g - k) / (1 - k) || 0;
|
|
6482
|
-
const y = (1 - b - k) / (1 - k) || 0;
|
|
6483
|
-
return [c * 100, m * 100, y * 100, k * 100];
|
|
6484
|
-
};
|
|
6485
|
-
function comparativeDistance(x, y) {
|
|
6486
|
-
return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
|
|
6487
|
-
}
|
|
6488
|
-
convert.rgb.keyword = function(rgb) {
|
|
6489
|
-
const reversed = reverseKeywords[rgb];
|
|
6490
|
-
if (reversed) {
|
|
6491
|
-
return reversed;
|
|
6492
|
-
}
|
|
6493
|
-
let currentClosestDistance = Infinity;
|
|
6494
|
-
let currentClosestKeyword;
|
|
6495
|
-
for (const keyword of Object.keys(cssKeywords)) {
|
|
6496
|
-
const value = cssKeywords[keyword];
|
|
6497
|
-
const distance = comparativeDistance(rgb, value);
|
|
6498
|
-
if (distance < currentClosestDistance) {
|
|
6499
|
-
currentClosestDistance = distance;
|
|
6500
|
-
currentClosestKeyword = keyword;
|
|
6501
|
-
}
|
|
6502
|
-
}
|
|
6503
|
-
return currentClosestKeyword;
|
|
6504
|
-
};
|
|
6505
|
-
convert.keyword.rgb = function(keyword) {
|
|
6506
|
-
return cssKeywords[keyword];
|
|
6507
|
-
};
|
|
6508
|
-
convert.rgb.xyz = function(rgb) {
|
|
6509
|
-
let r = rgb[0] / 255;
|
|
6510
|
-
let g = rgb[1] / 255;
|
|
6511
|
-
let b = rgb[2] / 255;
|
|
6512
|
-
r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
|
|
6513
|
-
g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
|
|
6514
|
-
b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
|
|
6515
|
-
const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
|
|
6516
|
-
const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
|
|
6517
|
-
const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
|
|
6518
|
-
return [x * 100, y * 100, z * 100];
|
|
6519
|
-
};
|
|
6520
|
-
convert.rgb.lab = function(rgb) {
|
|
6521
|
-
const xyz = convert.rgb.xyz(rgb);
|
|
6522
|
-
let x = xyz[0];
|
|
6523
|
-
let y = xyz[1];
|
|
6524
|
-
let z = xyz[2];
|
|
6525
|
-
x /= 95.047;
|
|
6526
|
-
y /= 100;
|
|
6527
|
-
z /= 108.883;
|
|
6528
|
-
x = x > 0.008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
6529
|
-
y = y > 0.008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
6530
|
-
z = z > 0.008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
6531
|
-
const l = 116 * y - 16;
|
|
6532
|
-
const a = 500 * (x - y);
|
|
6533
|
-
const b = 200 * (y - z);
|
|
6534
|
-
return [l, a, b];
|
|
6535
|
-
};
|
|
6536
|
-
convert.hsl.rgb = function(hsl) {
|
|
6537
|
-
const h = hsl[0] / 360;
|
|
6538
|
-
const s = hsl[1] / 100;
|
|
6539
|
-
const l = hsl[2] / 100;
|
|
6540
|
-
let t2;
|
|
6541
|
-
let t3;
|
|
6542
|
-
let val;
|
|
6543
|
-
if (s === 0) {
|
|
6544
|
-
val = l * 255;
|
|
6545
|
-
return [val, val, val];
|
|
6546
|
-
}
|
|
6547
|
-
if (l < 0.5) {
|
|
6548
|
-
t2 = l * (1 + s);
|
|
6549
|
-
} else {
|
|
6550
|
-
t2 = l + s - l * s;
|
|
6551
|
-
}
|
|
6552
|
-
const t1 = 2 * l - t2;
|
|
6553
|
-
const rgb = [0, 0, 0];
|
|
6554
|
-
for (let i = 0;i < 3; i++) {
|
|
6555
|
-
t3 = h + 1 / 3 * -(i - 1);
|
|
6556
|
-
if (t3 < 0) {
|
|
6557
|
-
t3++;
|
|
6558
|
-
}
|
|
6559
|
-
if (t3 > 1) {
|
|
6560
|
-
t3--;
|
|
6561
|
-
}
|
|
6562
|
-
if (6 * t3 < 1) {
|
|
6563
|
-
val = t1 + (t2 - t1) * 6 * t3;
|
|
6564
|
-
} else if (2 * t3 < 1) {
|
|
6565
|
-
val = t2;
|
|
6566
|
-
} else if (3 * t3 < 2) {
|
|
6567
|
-
val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
|
|
6568
|
-
} else {
|
|
6569
|
-
val = t1;
|
|
6570
|
-
}
|
|
6571
|
-
rgb[i] = val * 255;
|
|
6572
|
-
}
|
|
6573
|
-
return rgb;
|
|
6574
|
-
};
|
|
6575
|
-
convert.hsl.hsv = function(hsl) {
|
|
6576
|
-
const h = hsl[0];
|
|
6577
|
-
let s = hsl[1] / 100;
|
|
6578
|
-
let l = hsl[2] / 100;
|
|
6579
|
-
let smin = s;
|
|
6580
|
-
const lmin = Math.max(l, 0.01);
|
|
6581
|
-
l *= 2;
|
|
6582
|
-
s *= l <= 1 ? l : 2 - l;
|
|
6583
|
-
smin *= lmin <= 1 ? lmin : 2 - lmin;
|
|
6584
|
-
const v = (l + s) / 2;
|
|
6585
|
-
const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
|
|
6586
|
-
return [h, sv * 100, v * 100];
|
|
6587
|
-
};
|
|
6588
|
-
convert.hsv.rgb = function(hsv) {
|
|
6589
|
-
const h = hsv[0] / 60;
|
|
6590
|
-
const s = hsv[1] / 100;
|
|
6591
|
-
let v = hsv[2] / 100;
|
|
6592
|
-
const hi = Math.floor(h) % 6;
|
|
6593
|
-
const f = h - Math.floor(h);
|
|
6594
|
-
const p = 255 * v * (1 - s);
|
|
6595
|
-
const q = 255 * v * (1 - s * f);
|
|
6596
|
-
const t = 255 * v * (1 - s * (1 - f));
|
|
6597
|
-
v *= 255;
|
|
6598
|
-
switch (hi) {
|
|
6599
|
-
case 0:
|
|
6600
|
-
return [v, t, p];
|
|
6601
|
-
case 1:
|
|
6602
|
-
return [q, v, p];
|
|
6603
|
-
case 2:
|
|
6604
|
-
return [p, v, t];
|
|
6605
|
-
case 3:
|
|
6606
|
-
return [p, q, v];
|
|
6607
|
-
case 4:
|
|
6608
|
-
return [t, p, v];
|
|
6609
|
-
case 5:
|
|
6610
|
-
return [v, p, q];
|
|
6611
|
-
}
|
|
6612
|
-
};
|
|
6613
|
-
convert.hsv.hsl = function(hsv) {
|
|
6614
|
-
const h = hsv[0];
|
|
6615
|
-
const s = hsv[1] / 100;
|
|
6616
|
-
const v = hsv[2] / 100;
|
|
6617
|
-
const vmin = Math.max(v, 0.01);
|
|
6618
|
-
let sl;
|
|
6619
|
-
let l;
|
|
6620
|
-
l = (2 - s) * v;
|
|
6621
|
-
const lmin = (2 - s) * vmin;
|
|
6622
|
-
sl = s * vmin;
|
|
6623
|
-
sl /= lmin <= 1 ? lmin : 2 - lmin;
|
|
6624
|
-
sl = sl || 0;
|
|
6625
|
-
l /= 2;
|
|
6626
|
-
return [h, sl * 100, l * 100];
|
|
6627
|
-
};
|
|
6628
|
-
convert.hwb.rgb = function(hwb) {
|
|
6629
|
-
const h = hwb[0] / 360;
|
|
6630
|
-
let wh = hwb[1] / 100;
|
|
6631
|
-
let bl = hwb[2] / 100;
|
|
6632
|
-
const ratio = wh + bl;
|
|
6633
|
-
let f;
|
|
6634
|
-
if (ratio > 1) {
|
|
6635
|
-
wh /= ratio;
|
|
6636
|
-
bl /= ratio;
|
|
6637
|
-
}
|
|
6638
|
-
const i = Math.floor(6 * h);
|
|
6639
|
-
const v = 1 - bl;
|
|
6640
|
-
f = 6 * h - i;
|
|
6641
|
-
if ((i & 1) !== 0) {
|
|
6642
|
-
f = 1 - f;
|
|
6643
|
-
}
|
|
6644
|
-
const n = wh + f * (v - wh);
|
|
6645
|
-
let r;
|
|
6646
|
-
let g;
|
|
6647
|
-
let b;
|
|
6648
|
-
switch (i) {
|
|
6649
|
-
default:
|
|
6650
|
-
case 6:
|
|
6651
|
-
case 0:
|
|
6652
|
-
r = v;
|
|
6653
|
-
g = n;
|
|
6654
|
-
b = wh;
|
|
6655
|
-
break;
|
|
6656
|
-
case 1:
|
|
6657
|
-
r = n;
|
|
6658
|
-
g = v;
|
|
6659
|
-
b = wh;
|
|
6660
|
-
break;
|
|
6661
|
-
case 2:
|
|
6662
|
-
r = wh;
|
|
6663
|
-
g = v;
|
|
6664
|
-
b = n;
|
|
6665
|
-
break;
|
|
6666
|
-
case 3:
|
|
6667
|
-
r = wh;
|
|
6668
|
-
g = n;
|
|
6669
|
-
b = v;
|
|
6670
|
-
break;
|
|
6671
|
-
case 4:
|
|
6672
|
-
r = n;
|
|
6673
|
-
g = wh;
|
|
6674
|
-
b = v;
|
|
6675
|
-
break;
|
|
6676
|
-
case 5:
|
|
6677
|
-
r = v;
|
|
6678
|
-
g = wh;
|
|
6679
|
-
b = n;
|
|
6680
|
-
break;
|
|
6681
|
-
}
|
|
6682
|
-
return [r * 255, g * 255, b * 255];
|
|
6683
|
-
};
|
|
6684
|
-
convert.cmyk.rgb = function(cmyk) {
|
|
6685
|
-
const c = cmyk[0] / 100;
|
|
6686
|
-
const m = cmyk[1] / 100;
|
|
6687
|
-
const y = cmyk[2] / 100;
|
|
6688
|
-
const k = cmyk[3] / 100;
|
|
6689
|
-
const r = 1 - Math.min(1, c * (1 - k) + k);
|
|
6690
|
-
const g = 1 - Math.min(1, m * (1 - k) + k);
|
|
6691
|
-
const b = 1 - Math.min(1, y * (1 - k) + k);
|
|
6692
|
-
return [r * 255, g * 255, b * 255];
|
|
6693
|
-
};
|
|
6694
|
-
convert.xyz.rgb = function(xyz) {
|
|
6695
|
-
const x = xyz[0] / 100;
|
|
6696
|
-
const y = xyz[1] / 100;
|
|
6697
|
-
const z = xyz[2] / 100;
|
|
6698
|
-
let r;
|
|
6699
|
-
let g;
|
|
6700
|
-
let b;
|
|
6701
|
-
r = x * 3.2406 + y * -1.5372 + z * -0.4986;
|
|
6702
|
-
g = x * -0.9689 + y * 1.8758 + z * 0.0415;
|
|
6703
|
-
b = x * 0.0557 + y * -0.204 + z * 1.057;
|
|
6704
|
-
r = r > 0.0031308 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92;
|
|
6705
|
-
g = g > 0.0031308 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92;
|
|
6706
|
-
b = b > 0.0031308 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92;
|
|
6707
|
-
r = Math.min(Math.max(0, r), 1);
|
|
6708
|
-
g = Math.min(Math.max(0, g), 1);
|
|
6709
|
-
b = Math.min(Math.max(0, b), 1);
|
|
6710
|
-
return [r * 255, g * 255, b * 255];
|
|
6711
|
-
};
|
|
6712
|
-
convert.xyz.lab = function(xyz) {
|
|
6713
|
-
let x = xyz[0];
|
|
6714
|
-
let y = xyz[1];
|
|
6715
|
-
let z = xyz[2];
|
|
6716
|
-
x /= 95.047;
|
|
6717
|
-
y /= 100;
|
|
6718
|
-
z /= 108.883;
|
|
6719
|
-
x = x > 0.008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
6720
|
-
y = y > 0.008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
6721
|
-
z = z > 0.008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
6722
|
-
const l = 116 * y - 16;
|
|
6723
|
-
const a = 500 * (x - y);
|
|
6724
|
-
const b = 200 * (y - z);
|
|
6725
|
-
return [l, a, b];
|
|
6726
|
-
};
|
|
6727
|
-
convert.lab.xyz = function(lab) {
|
|
6728
|
-
const l = lab[0];
|
|
6729
|
-
const a = lab[1];
|
|
6730
|
-
const b = lab[2];
|
|
6731
|
-
let x;
|
|
6732
|
-
let y;
|
|
6733
|
-
let z;
|
|
6734
|
-
y = (l + 16) / 116;
|
|
6735
|
-
x = a / 500 + y;
|
|
6736
|
-
z = y - b / 200;
|
|
6737
|
-
const y2 = y ** 3;
|
|
6738
|
-
const x2 = x ** 3;
|
|
6739
|
-
const z2 = z ** 3;
|
|
6740
|
-
y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
|
|
6741
|
-
x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
|
|
6742
|
-
z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
|
|
6743
|
-
x *= 95.047;
|
|
6744
|
-
y *= 100;
|
|
6745
|
-
z *= 108.883;
|
|
6746
|
-
return [x, y, z];
|
|
6747
|
-
};
|
|
6748
|
-
convert.lab.lch = function(lab) {
|
|
6749
|
-
const l = lab[0];
|
|
6750
|
-
const a = lab[1];
|
|
6751
|
-
const b = lab[2];
|
|
6752
|
-
let h;
|
|
6753
|
-
const hr = Math.atan2(b, a);
|
|
6754
|
-
h = hr * 360 / 2 / Math.PI;
|
|
6755
|
-
if (h < 0) {
|
|
6756
|
-
h += 360;
|
|
6757
|
-
}
|
|
6758
|
-
const c = Math.sqrt(a * a + b * b);
|
|
6759
|
-
return [l, c, h];
|
|
6760
|
-
};
|
|
6761
|
-
convert.lch.lab = function(lch) {
|
|
6762
|
-
const l = lch[0];
|
|
6763
|
-
const c = lch[1];
|
|
6764
|
-
const h = lch[2];
|
|
6765
|
-
const hr = h / 360 * 2 * Math.PI;
|
|
6766
|
-
const a = c * Math.cos(hr);
|
|
6767
|
-
const b = c * Math.sin(hr);
|
|
6768
|
-
return [l, a, b];
|
|
6769
|
-
};
|
|
6770
|
-
convert.rgb.ansi16 = function(args, saturation = null) {
|
|
6771
|
-
const [r, g, b] = args;
|
|
6772
|
-
let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
|
|
6773
|
-
value = Math.round(value / 50);
|
|
6774
|
-
if (value === 0) {
|
|
6775
|
-
return 30;
|
|
6776
|
-
}
|
|
6777
|
-
let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
|
|
6778
|
-
if (value === 2) {
|
|
6779
|
-
ansi += 60;
|
|
6780
|
-
}
|
|
6781
|
-
return ansi;
|
|
6782
|
-
};
|
|
6783
|
-
convert.hsv.ansi16 = function(args) {
|
|
6784
|
-
return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
|
|
6785
|
-
};
|
|
6786
|
-
convert.rgb.ansi256 = function(args) {
|
|
6787
|
-
const r = args[0];
|
|
6788
|
-
const g = args[1];
|
|
6789
|
-
const b = args[2];
|
|
6790
|
-
if (r === g && g === b) {
|
|
6791
|
-
if (r < 8) {
|
|
6792
|
-
return 16;
|
|
6793
|
-
}
|
|
6794
|
-
if (r > 248) {
|
|
6795
|
-
return 231;
|
|
6796
|
-
}
|
|
6797
|
-
return Math.round((r - 8) / 247 * 24) + 232;
|
|
6798
|
-
}
|
|
6799
|
-
const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
|
|
6800
|
-
return ansi;
|
|
6801
|
-
};
|
|
6802
|
-
convert.ansi16.rgb = function(args) {
|
|
6803
|
-
let color = args % 10;
|
|
6804
|
-
if (color === 0 || color === 7) {
|
|
6805
|
-
if (args > 50) {
|
|
6806
|
-
color += 3.5;
|
|
6807
|
-
}
|
|
6808
|
-
color = color / 10.5 * 255;
|
|
6809
|
-
return [color, color, color];
|
|
6810
|
-
}
|
|
6811
|
-
const mult = (~~(args > 50) + 1) * 0.5;
|
|
6812
|
-
const r = (color & 1) * mult * 255;
|
|
6813
|
-
const g = (color >> 1 & 1) * mult * 255;
|
|
6814
|
-
const b = (color >> 2 & 1) * mult * 255;
|
|
6815
|
-
return [r, g, b];
|
|
6816
|
-
};
|
|
6817
|
-
convert.ansi256.rgb = function(args) {
|
|
6818
|
-
if (args >= 232) {
|
|
6819
|
-
const c = (args - 232) * 10 + 8;
|
|
6820
|
-
return [c, c, c];
|
|
6821
|
-
}
|
|
6822
|
-
args -= 16;
|
|
6823
|
-
let rem;
|
|
6824
|
-
const r = Math.floor(args / 36) / 5 * 255;
|
|
6825
|
-
const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
|
|
6826
|
-
const b = rem % 6 / 5 * 255;
|
|
6827
|
-
return [r, g, b];
|
|
6828
|
-
};
|
|
6829
|
-
convert.rgb.hex = function(args) {
|
|
6830
|
-
const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
|
|
6831
|
-
const string = integer.toString(16).toUpperCase();
|
|
6832
|
-
return "000000".substring(string.length) + string;
|
|
6833
|
-
};
|
|
6834
|
-
convert.hex.rgb = function(args) {
|
|
6835
|
-
const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
|
6836
|
-
if (!match) {
|
|
6837
|
-
return [0, 0, 0];
|
|
6838
|
-
}
|
|
6839
|
-
let colorString = match[0];
|
|
6840
|
-
if (match[0].length === 3) {
|
|
6841
|
-
colorString = colorString.split("").map((char) => {
|
|
6842
|
-
return char + char;
|
|
6843
|
-
}).join("");
|
|
6844
|
-
}
|
|
6845
|
-
const integer = parseInt(colorString, 16);
|
|
6846
|
-
const r = integer >> 16 & 255;
|
|
6847
|
-
const g = integer >> 8 & 255;
|
|
6848
|
-
const b = integer & 255;
|
|
6849
|
-
return [r, g, b];
|
|
6850
|
-
};
|
|
6851
|
-
convert.rgb.hcg = function(rgb) {
|
|
6852
|
-
const r = rgb[0] / 255;
|
|
6853
|
-
const g = rgb[1] / 255;
|
|
6854
|
-
const b = rgb[2] / 255;
|
|
6855
|
-
const max = Math.max(Math.max(r, g), b);
|
|
6856
|
-
const min = Math.min(Math.min(r, g), b);
|
|
6857
|
-
const chroma = max - min;
|
|
6858
|
-
let grayscale;
|
|
6859
|
-
let hue;
|
|
6860
|
-
if (chroma < 1) {
|
|
6861
|
-
grayscale = min / (1 - chroma);
|
|
6862
|
-
} else {
|
|
6863
|
-
grayscale = 0;
|
|
6864
|
-
}
|
|
6865
|
-
if (chroma <= 0) {
|
|
6866
|
-
hue = 0;
|
|
6867
|
-
} else if (max === r) {
|
|
6868
|
-
hue = (g - b) / chroma % 6;
|
|
6869
|
-
} else if (max === g) {
|
|
6870
|
-
hue = 2 + (b - r) / chroma;
|
|
6871
|
-
} else {
|
|
6872
|
-
hue = 4 + (r - g) / chroma;
|
|
6873
|
-
}
|
|
6874
|
-
hue /= 6;
|
|
6875
|
-
hue %= 1;
|
|
6876
|
-
return [hue * 360, chroma * 100, grayscale * 100];
|
|
6877
|
-
};
|
|
6878
|
-
convert.hsl.hcg = function(hsl) {
|
|
6879
|
-
const s = hsl[1] / 100;
|
|
6880
|
-
const l = hsl[2] / 100;
|
|
6881
|
-
const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l);
|
|
6882
|
-
let f = 0;
|
|
6883
|
-
if (c < 1) {
|
|
6884
|
-
f = (l - 0.5 * c) / (1 - c);
|
|
6885
|
-
}
|
|
6886
|
-
return [hsl[0], c * 100, f * 100];
|
|
6887
|
-
};
|
|
6888
|
-
convert.hsv.hcg = function(hsv) {
|
|
6889
|
-
const s = hsv[1] / 100;
|
|
6890
|
-
const v = hsv[2] / 100;
|
|
6891
|
-
const c = s * v;
|
|
6892
|
-
let f = 0;
|
|
6893
|
-
if (c < 1) {
|
|
6894
|
-
f = (v - c) / (1 - c);
|
|
6895
|
-
}
|
|
6896
|
-
return [hsv[0], c * 100, f * 100];
|
|
6897
|
-
};
|
|
6898
|
-
convert.hcg.rgb = function(hcg) {
|
|
6899
|
-
const h = hcg[0] / 360;
|
|
6900
|
-
const c = hcg[1] / 100;
|
|
6901
|
-
const g = hcg[2] / 100;
|
|
6902
|
-
if (c === 0) {
|
|
6903
|
-
return [g * 255, g * 255, g * 255];
|
|
6904
|
-
}
|
|
6905
|
-
const pure = [0, 0, 0];
|
|
6906
|
-
const hi = h % 1 * 6;
|
|
6907
|
-
const v = hi % 1;
|
|
6908
|
-
const w = 1 - v;
|
|
6909
|
-
let mg = 0;
|
|
6910
|
-
switch (Math.floor(hi)) {
|
|
6911
|
-
case 0:
|
|
6912
|
-
pure[0] = 1;
|
|
6913
|
-
pure[1] = v;
|
|
6914
|
-
pure[2] = 0;
|
|
6915
|
-
break;
|
|
6916
|
-
case 1:
|
|
6917
|
-
pure[0] = w;
|
|
6918
|
-
pure[1] = 1;
|
|
6919
|
-
pure[2] = 0;
|
|
6920
|
-
break;
|
|
6921
|
-
case 2:
|
|
6922
|
-
pure[0] = 0;
|
|
6923
|
-
pure[1] = 1;
|
|
6924
|
-
pure[2] = v;
|
|
6925
|
-
break;
|
|
6926
|
-
case 3:
|
|
6927
|
-
pure[0] = 0;
|
|
6928
|
-
pure[1] = w;
|
|
6929
|
-
pure[2] = 1;
|
|
6930
|
-
break;
|
|
6931
|
-
case 4:
|
|
6932
|
-
pure[0] = v;
|
|
6933
|
-
pure[1] = 0;
|
|
6934
|
-
pure[2] = 1;
|
|
6935
|
-
break;
|
|
6936
|
-
default:
|
|
6937
|
-
pure[0] = 1;
|
|
6938
|
-
pure[1] = 0;
|
|
6939
|
-
pure[2] = w;
|
|
6940
|
-
}
|
|
6941
|
-
mg = (1 - c) * g;
|
|
6942
|
-
return [
|
|
6943
|
-
(c * pure[0] + mg) * 255,
|
|
6944
|
-
(c * pure[1] + mg) * 255,
|
|
6945
|
-
(c * pure[2] + mg) * 255
|
|
6946
|
-
];
|
|
6947
|
-
};
|
|
6948
|
-
convert.hcg.hsv = function(hcg) {
|
|
6949
|
-
const c = hcg[1] / 100;
|
|
6950
|
-
const g = hcg[2] / 100;
|
|
6951
|
-
const v = c + g * (1 - c);
|
|
6952
|
-
let f = 0;
|
|
6953
|
-
if (v > 0) {
|
|
6954
|
-
f = c / v;
|
|
6955
|
-
}
|
|
6956
|
-
return [hcg[0], f * 100, v * 100];
|
|
6957
|
-
};
|
|
6958
|
-
convert.hcg.hsl = function(hcg) {
|
|
6959
|
-
const c = hcg[1] / 100;
|
|
6960
|
-
const g = hcg[2] / 100;
|
|
6961
|
-
const l = g * (1 - c) + 0.5 * c;
|
|
6962
|
-
let s = 0;
|
|
6963
|
-
if (l > 0 && l < 0.5) {
|
|
6964
|
-
s = c / (2 * l);
|
|
6965
|
-
} else if (l >= 0.5 && l < 1) {
|
|
6966
|
-
s = c / (2 * (1 - l));
|
|
6967
|
-
}
|
|
6968
|
-
return [hcg[0], s * 100, l * 100];
|
|
6969
|
-
};
|
|
6970
|
-
convert.hcg.hwb = function(hcg) {
|
|
6971
|
-
const c = hcg[1] / 100;
|
|
6972
|
-
const g = hcg[2] / 100;
|
|
6973
|
-
const v = c + g * (1 - c);
|
|
6974
|
-
return [hcg[0], (v - c) * 100, (1 - v) * 100];
|
|
6975
|
-
};
|
|
6976
|
-
convert.hwb.hcg = function(hwb) {
|
|
6977
|
-
const w = hwb[1] / 100;
|
|
6978
|
-
const b = hwb[2] / 100;
|
|
6979
|
-
const v = 1 - b;
|
|
6980
|
-
const c = v - w;
|
|
6981
|
-
let g = 0;
|
|
6982
|
-
if (c < 1) {
|
|
6983
|
-
g = (v - c) / (1 - c);
|
|
6984
|
-
}
|
|
6985
|
-
return [hwb[0], c * 100, g * 100];
|
|
6986
|
-
};
|
|
6987
|
-
convert.apple.rgb = function(apple) {
|
|
6988
|
-
return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
|
|
6989
|
-
};
|
|
6990
|
-
convert.rgb.apple = function(rgb) {
|
|
6991
|
-
return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
|
|
6992
|
-
};
|
|
6993
|
-
convert.gray.rgb = function(args) {
|
|
6994
|
-
return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
|
|
6995
|
-
};
|
|
6996
|
-
convert.gray.hsl = function(args) {
|
|
6997
|
-
return [0, 0, args[0]];
|
|
6998
|
-
};
|
|
6999
|
-
convert.gray.hsv = convert.gray.hsl;
|
|
7000
|
-
convert.gray.hwb = function(gray) {
|
|
7001
|
-
return [0, 100, gray[0]];
|
|
7002
|
-
};
|
|
7003
|
-
convert.gray.cmyk = function(gray) {
|
|
7004
|
-
return [0, 0, 0, gray[0]];
|
|
7005
|
-
};
|
|
7006
|
-
convert.gray.lab = function(gray) {
|
|
7007
|
-
return [gray[0], 0, 0];
|
|
7008
|
-
};
|
|
7009
|
-
convert.gray.hex = function(gray) {
|
|
7010
|
-
const val = Math.round(gray[0] / 100 * 255) & 255;
|
|
7011
|
-
const integer = (val << 16) + (val << 8) + val;
|
|
7012
|
-
const string = integer.toString(16).toUpperCase();
|
|
7013
|
-
return "000000".substring(string.length) + string;
|
|
7014
|
-
};
|
|
7015
|
-
convert.rgb.gray = function(rgb) {
|
|
7016
|
-
const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
|
|
7017
|
-
return [val / 255 * 100];
|
|
7018
|
-
};
|
|
7019
|
-
});
|
|
7020
|
-
|
|
7021
|
-
// ../../node_modules/color-convert/route.js
|
|
7022
|
-
var require_route = __commonJS((exports, module) => {
|
|
7023
|
-
var conversions = require_conversions();
|
|
7024
|
-
function buildGraph() {
|
|
7025
|
-
const graph = {};
|
|
7026
|
-
const models = Object.keys(conversions);
|
|
7027
|
-
for (let len = models.length, i = 0;i < len; i++) {
|
|
7028
|
-
graph[models[i]] = {
|
|
7029
|
-
distance: -1,
|
|
7030
|
-
parent: null
|
|
7031
|
-
};
|
|
7032
|
-
}
|
|
7033
|
-
return graph;
|
|
7034
|
-
}
|
|
7035
|
-
function deriveBFS(fromModel) {
|
|
7036
|
-
const graph = buildGraph();
|
|
7037
|
-
const queue = [fromModel];
|
|
7038
|
-
graph[fromModel].distance = 0;
|
|
7039
|
-
while (queue.length) {
|
|
7040
|
-
const current = queue.pop();
|
|
7041
|
-
const adjacents = Object.keys(conversions[current]);
|
|
7042
|
-
for (let len = adjacents.length, i = 0;i < len; i++) {
|
|
7043
|
-
const adjacent = adjacents[i];
|
|
7044
|
-
const node = graph[adjacent];
|
|
7045
|
-
if (node.distance === -1) {
|
|
7046
|
-
node.distance = graph[current].distance + 1;
|
|
7047
|
-
node.parent = current;
|
|
7048
|
-
queue.unshift(adjacent);
|
|
7049
|
-
}
|
|
7050
|
-
}
|
|
7051
|
-
}
|
|
7052
|
-
return graph;
|
|
7053
|
-
}
|
|
7054
|
-
function link(from, to) {
|
|
7055
|
-
return function(args) {
|
|
7056
|
-
return to(from(args));
|
|
7057
|
-
};
|
|
7058
|
-
}
|
|
7059
|
-
function wrapConversion(toModel, graph) {
|
|
7060
|
-
const path = [graph[toModel].parent, toModel];
|
|
7061
|
-
let fn = conversions[graph[toModel].parent][toModel];
|
|
7062
|
-
let cur = graph[toModel].parent;
|
|
7063
|
-
while (graph[cur].parent) {
|
|
7064
|
-
path.unshift(graph[cur].parent);
|
|
7065
|
-
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
7066
|
-
cur = graph[cur].parent;
|
|
7067
|
-
}
|
|
7068
|
-
fn.conversion = path;
|
|
7069
|
-
return fn;
|
|
7070
|
-
}
|
|
7071
|
-
module.exports = function(fromModel) {
|
|
7072
|
-
const graph = deriveBFS(fromModel);
|
|
7073
|
-
const conversion = {};
|
|
7074
|
-
const models = Object.keys(graph);
|
|
7075
|
-
for (let len = models.length, i = 0;i < len; i++) {
|
|
7076
|
-
const toModel = models[i];
|
|
7077
|
-
const node = graph[toModel];
|
|
7078
|
-
if (node.parent === null) {
|
|
7079
|
-
continue;
|
|
7080
|
-
}
|
|
7081
|
-
conversion[toModel] = wrapConversion(toModel, graph);
|
|
7082
|
-
}
|
|
7083
|
-
return conversion;
|
|
7084
|
-
};
|
|
7085
|
-
});
|
|
7086
|
-
|
|
7087
|
-
// ../../node_modules/color-convert/index.js
|
|
7088
|
-
var require_color_convert = __commonJS((exports, module) => {
|
|
7089
|
-
var conversions = require_conversions();
|
|
7090
|
-
var route = require_route();
|
|
7091
|
-
var convert = {};
|
|
7092
|
-
var models = Object.keys(conversions);
|
|
7093
|
-
function wrapRaw(fn) {
|
|
7094
|
-
const wrappedFn = function(...args) {
|
|
7095
|
-
const arg0 = args[0];
|
|
7096
|
-
if (arg0 === undefined || arg0 === null) {
|
|
7097
|
-
return arg0;
|
|
7098
|
-
}
|
|
7099
|
-
if (arg0.length > 1) {
|
|
7100
|
-
args = arg0;
|
|
7101
|
-
}
|
|
7102
|
-
return fn(args);
|
|
7103
|
-
};
|
|
7104
|
-
if ("conversion" in fn) {
|
|
7105
|
-
wrappedFn.conversion = fn.conversion;
|
|
7106
|
-
}
|
|
7107
|
-
return wrappedFn;
|
|
7108
|
-
}
|
|
7109
|
-
function wrapRounded(fn) {
|
|
7110
|
-
const wrappedFn = function(...args) {
|
|
7111
|
-
const arg0 = args[0];
|
|
7112
|
-
if (arg0 === undefined || arg0 === null) {
|
|
7113
|
-
return arg0;
|
|
7114
|
-
}
|
|
7115
|
-
if (arg0.length > 1) {
|
|
7116
|
-
args = arg0;
|
|
7117
|
-
}
|
|
7118
|
-
const result = fn(args);
|
|
7119
|
-
if (typeof result === "object") {
|
|
7120
|
-
for (let len = result.length, i = 0;i < len; i++) {
|
|
7121
|
-
result[i] = Math.round(result[i]);
|
|
7122
|
-
}
|
|
7123
|
-
}
|
|
7124
|
-
return result;
|
|
7125
|
-
};
|
|
7126
|
-
if ("conversion" in fn) {
|
|
7127
|
-
wrappedFn.conversion = fn.conversion;
|
|
7128
|
-
}
|
|
7129
|
-
return wrappedFn;
|
|
7130
|
-
}
|
|
7131
|
-
models.forEach((fromModel) => {
|
|
7132
|
-
convert[fromModel] = {};
|
|
7133
|
-
Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
|
|
7134
|
-
Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
|
|
7135
|
-
const routes = route(fromModel);
|
|
7136
|
-
const routeModels = Object.keys(routes);
|
|
7137
|
-
routeModels.forEach((toModel) => {
|
|
7138
|
-
const fn = routes[toModel];
|
|
7139
|
-
convert[fromModel][toModel] = wrapRounded(fn);
|
|
7140
|
-
convert[fromModel][toModel].raw = wrapRaw(fn);
|
|
7141
|
-
});
|
|
7142
|
-
});
|
|
7143
|
-
module.exports = convert;
|
|
7144
|
-
});
|
|
7145
|
-
|
|
7146
|
-
// ../../node_modules/ansi-styles/index.js
|
|
7147
|
-
var require_ansi_styles = __commonJS((exports, module) => {
|
|
7148
|
-
var wrapAnsi16 = (fn, offset) => (...args) => {
|
|
7149
|
-
const code = fn(...args);
|
|
7150
|
-
return `\x1B[${code + offset}m`;
|
|
7151
|
-
};
|
|
7152
|
-
var wrapAnsi256 = (fn, offset) => (...args) => {
|
|
7153
|
-
const code = fn(...args);
|
|
7154
|
-
return `\x1B[${38 + offset};5;${code}m`;
|
|
7155
|
-
};
|
|
7156
|
-
var wrapAnsi16m = (fn, offset) => (...args) => {
|
|
7157
|
-
const rgb = fn(...args);
|
|
7158
|
-
return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
|
|
7159
|
-
};
|
|
7160
|
-
var ansi2ansi = (n) => n;
|
|
7161
|
-
var rgb2rgb = (r, g, b) => [r, g, b];
|
|
7162
|
-
var setLazyProperty = (object, property, get) => {
|
|
7163
|
-
Object.defineProperty(object, property, {
|
|
7164
|
-
get: () => {
|
|
7165
|
-
const value = get();
|
|
7166
|
-
Object.defineProperty(object, property, {
|
|
7167
|
-
value,
|
|
7168
|
-
enumerable: true,
|
|
7169
|
-
configurable: true
|
|
7170
|
-
});
|
|
7171
|
-
return value;
|
|
7172
|
-
},
|
|
7173
|
-
enumerable: true,
|
|
7174
|
-
configurable: true
|
|
7175
|
-
});
|
|
7176
|
-
};
|
|
7177
|
-
var colorConvert;
|
|
7178
|
-
var makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
|
|
7179
|
-
if (colorConvert === undefined) {
|
|
7180
|
-
colorConvert = require_color_convert();
|
|
7181
|
-
}
|
|
7182
|
-
const offset = isBackground ? 10 : 0;
|
|
7183
|
-
const styles = {};
|
|
7184
|
-
for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
|
|
7185
|
-
const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
|
|
7186
|
-
if (sourceSpace === targetSpace) {
|
|
7187
|
-
styles[name] = wrap(identity, offset);
|
|
7188
|
-
} else if (typeof suite === "object") {
|
|
7189
|
-
styles[name] = wrap(suite[targetSpace], offset);
|
|
7190
|
-
}
|
|
7191
|
-
}
|
|
7192
|
-
return styles;
|
|
7193
|
-
};
|
|
7194
|
-
function assembleStyles() {
|
|
7195
|
-
const codes = new Map;
|
|
7196
|
-
const styles = {
|
|
7197
|
-
modifier: {
|
|
7198
|
-
reset: [0, 0],
|
|
7199
|
-
bold: [1, 22],
|
|
7200
|
-
dim: [2, 22],
|
|
7201
|
-
italic: [3, 23],
|
|
7202
|
-
underline: [4, 24],
|
|
7203
|
-
inverse: [7, 27],
|
|
7204
|
-
hidden: [8, 28],
|
|
7205
|
-
strikethrough: [9, 29]
|
|
7206
|
-
},
|
|
7207
|
-
color: {
|
|
7208
|
-
black: [30, 39],
|
|
7209
|
-
red: [31, 39],
|
|
7210
|
-
green: [32, 39],
|
|
7211
|
-
yellow: [33, 39],
|
|
7212
|
-
blue: [34, 39],
|
|
7213
|
-
magenta: [35, 39],
|
|
7214
|
-
cyan: [36, 39],
|
|
7215
|
-
white: [37, 39],
|
|
7216
|
-
blackBright: [90, 39],
|
|
7217
|
-
redBright: [91, 39],
|
|
7218
|
-
greenBright: [92, 39],
|
|
7219
|
-
yellowBright: [93, 39],
|
|
7220
|
-
blueBright: [94, 39],
|
|
7221
|
-
magentaBright: [95, 39],
|
|
7222
|
-
cyanBright: [96, 39],
|
|
7223
|
-
whiteBright: [97, 39]
|
|
7224
|
-
},
|
|
7225
|
-
bgColor: {
|
|
7226
|
-
bgBlack: [40, 49],
|
|
7227
|
-
bgRed: [41, 49],
|
|
7228
|
-
bgGreen: [42, 49],
|
|
7229
|
-
bgYellow: [43, 49],
|
|
7230
|
-
bgBlue: [44, 49],
|
|
7231
|
-
bgMagenta: [45, 49],
|
|
7232
|
-
bgCyan: [46, 49],
|
|
7233
|
-
bgWhite: [47, 49],
|
|
7234
|
-
bgBlackBright: [100, 49],
|
|
7235
|
-
bgRedBright: [101, 49],
|
|
7236
|
-
bgGreenBright: [102, 49],
|
|
7237
|
-
bgYellowBright: [103, 49],
|
|
7238
|
-
bgBlueBright: [104, 49],
|
|
7239
|
-
bgMagentaBright: [105, 49],
|
|
7240
|
-
bgCyanBright: [106, 49],
|
|
7241
|
-
bgWhiteBright: [107, 49]
|
|
7242
|
-
}
|
|
7243
|
-
};
|
|
7244
|
-
styles.color.gray = styles.color.blackBright;
|
|
7245
|
-
styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
|
|
7246
|
-
styles.color.grey = styles.color.blackBright;
|
|
7247
|
-
styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
|
|
7248
|
-
for (const [groupName, group] of Object.entries(styles)) {
|
|
7249
|
-
for (const [styleName, style] of Object.entries(group)) {
|
|
7250
|
-
styles[styleName] = {
|
|
7251
|
-
open: `\x1B[${style[0]}m`,
|
|
7252
|
-
close: `\x1B[${style[1]}m`
|
|
7253
|
-
};
|
|
7254
|
-
group[styleName] = styles[styleName];
|
|
7255
|
-
codes.set(style[0], style[1]);
|
|
7256
|
-
}
|
|
7257
|
-
Object.defineProperty(styles, groupName, {
|
|
7258
|
-
value: group,
|
|
7259
|
-
enumerable: false
|
|
7260
|
-
});
|
|
7261
|
-
}
|
|
7262
|
-
Object.defineProperty(styles, "codes", {
|
|
7263
|
-
value: codes,
|
|
7264
|
-
enumerable: false
|
|
7265
|
-
});
|
|
7266
|
-
styles.color.close = "\x1B[39m";
|
|
7267
|
-
styles.bgColor.close = "\x1B[49m";
|
|
7268
|
-
setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
|
|
7269
|
-
setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
|
|
7270
|
-
setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
|
|
7271
|
-
setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
|
|
7272
|
-
setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
|
|
7273
|
-
setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
|
|
7274
|
-
return styles;
|
|
7275
|
-
}
|
|
7276
|
-
Object.defineProperty(module, "exports", {
|
|
7277
|
-
enumerable: true,
|
|
7278
|
-
get: assembleStyles
|
|
7279
|
-
});
|
|
7280
|
-
});
|
|
7281
|
-
|
|
7282
|
-
// ../../node_modules/has-flag/index.js
|
|
7283
|
-
var require_has_flag = __commonJS((exports, module) => {
|
|
7284
|
-
module.exports = (flag, argv = process.argv) => {
|
|
7285
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
7286
|
-
const position = argv.indexOf(prefix + flag);
|
|
7287
|
-
const terminatorPosition = argv.indexOf("--");
|
|
7288
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
7289
|
-
};
|
|
7290
|
-
});
|
|
7291
|
-
|
|
7292
|
-
// ../../node_modules/supports-color/index.js
|
|
7293
|
-
var require_supports_color = __commonJS((exports, module) => {
|
|
7294
|
-
var os = __require("os");
|
|
7295
|
-
var tty = __require("tty");
|
|
7296
|
-
var hasFlag = require_has_flag();
|
|
7297
|
-
var { env } = process;
|
|
7298
|
-
var forceColor;
|
|
7299
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
7300
|
-
forceColor = 0;
|
|
7301
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
7302
|
-
forceColor = 1;
|
|
7303
|
-
}
|
|
7304
|
-
if ("FORCE_COLOR" in env) {
|
|
7305
|
-
if (env.FORCE_COLOR === "true") {
|
|
7306
|
-
forceColor = 1;
|
|
7307
|
-
} else if (env.FORCE_COLOR === "false") {
|
|
7308
|
-
forceColor = 0;
|
|
7309
|
-
} else {
|
|
7310
|
-
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
7311
|
-
}
|
|
7312
|
-
}
|
|
7313
|
-
function translateLevel(level) {
|
|
7314
|
-
if (level === 0) {
|
|
7315
|
-
return false;
|
|
7316
|
-
}
|
|
7317
|
-
return {
|
|
7318
|
-
level,
|
|
7319
|
-
hasBasic: true,
|
|
7320
|
-
has256: level >= 2,
|
|
7321
|
-
has16m: level >= 3
|
|
7322
|
-
};
|
|
7323
|
-
}
|
|
7324
|
-
function supportsColor(haveStream, streamIsTTY) {
|
|
7325
|
-
if (forceColor === 0) {
|
|
7326
|
-
return 0;
|
|
7327
|
-
}
|
|
7328
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
7329
|
-
return 3;
|
|
7330
|
-
}
|
|
7331
|
-
if (hasFlag("color=256")) {
|
|
7332
|
-
return 2;
|
|
7333
|
-
}
|
|
7334
|
-
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
7335
|
-
return 0;
|
|
7336
|
-
}
|
|
7337
|
-
const min = forceColor || 0;
|
|
7338
|
-
if (env.TERM === "dumb") {
|
|
7339
|
-
return min;
|
|
7340
|
-
}
|
|
7341
|
-
if (process.platform === "win32") {
|
|
7342
|
-
const osRelease = os.release().split(".");
|
|
7343
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
7344
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
7345
|
-
}
|
|
7346
|
-
return 1;
|
|
7347
|
-
}
|
|
7348
|
-
if ("CI" in env) {
|
|
7349
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
|
|
7350
|
-
return 1;
|
|
7351
|
-
}
|
|
7352
|
-
return min;
|
|
7353
|
-
}
|
|
7354
|
-
if ("TEAMCITY_VERSION" in env) {
|
|
7355
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
7356
|
-
}
|
|
7357
|
-
if (env.COLORTERM === "truecolor") {
|
|
7358
|
-
return 3;
|
|
7359
|
-
}
|
|
7360
|
-
if ("TERM_PROGRAM" in env) {
|
|
7361
|
-
const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
7362
|
-
switch (env.TERM_PROGRAM) {
|
|
7363
|
-
case "iTerm.app":
|
|
7364
|
-
return version >= 3 ? 3 : 2;
|
|
7365
|
-
case "Apple_Terminal":
|
|
7366
|
-
return 2;
|
|
7367
|
-
}
|
|
7368
|
-
}
|
|
7369
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
7370
|
-
return 2;
|
|
7371
|
-
}
|
|
7372
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
7373
|
-
return 1;
|
|
7374
|
-
}
|
|
7375
|
-
if ("COLORTERM" in env) {
|
|
7376
|
-
return 1;
|
|
7377
|
-
}
|
|
7378
|
-
return min;
|
|
7379
|
-
}
|
|
7380
|
-
function getSupportLevel(stream) {
|
|
7381
|
-
const level = supportsColor(stream, stream && stream.isTTY);
|
|
7382
|
-
return translateLevel(level);
|
|
7383
|
-
}
|
|
7384
|
-
module.exports = {
|
|
7385
|
-
supportsColor: getSupportLevel,
|
|
7386
|
-
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
7387
|
-
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
|
7388
|
-
};
|
|
7389
|
-
});
|
|
7390
|
-
|
|
7391
|
-
// ../../node_modules/chalk/source/util.js
|
|
7392
|
-
var require_util2 = __commonJS((exports, module) => {
|
|
7393
|
-
var stringReplaceAll = (string, substring, replacer) => {
|
|
7394
|
-
let index = string.indexOf(substring);
|
|
7395
|
-
if (index === -1) {
|
|
7396
|
-
return string;
|
|
7397
|
-
}
|
|
7398
|
-
const substringLength = substring.length;
|
|
7399
|
-
let endIndex = 0;
|
|
7400
|
-
let returnValue = "";
|
|
7401
|
-
do {
|
|
7402
|
-
returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
|
|
7403
|
-
endIndex = index + substringLength;
|
|
7404
|
-
index = string.indexOf(substring, endIndex);
|
|
7405
|
-
} while (index !== -1);
|
|
7406
|
-
returnValue += string.substr(endIndex);
|
|
7407
|
-
return returnValue;
|
|
7408
|
-
};
|
|
7409
|
-
var stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
|
|
7410
|
-
let endIndex = 0;
|
|
7411
|
-
let returnValue = "";
|
|
7412
|
-
do {
|
|
7413
|
-
const gotCR = string[index - 1] === "\r";
|
|
7414
|
-
returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? `\r
|
|
7415
|
-
` : `
|
|
7416
|
-
`) + postfix;
|
|
7417
|
-
endIndex = index + 1;
|
|
7418
|
-
index = string.indexOf(`
|
|
7419
|
-
`, endIndex);
|
|
7420
|
-
} while (index !== -1);
|
|
7421
|
-
returnValue += string.substr(endIndex);
|
|
7422
|
-
return returnValue;
|
|
7423
|
-
};
|
|
7424
|
-
module.exports = {
|
|
7425
|
-
stringReplaceAll,
|
|
7426
|
-
stringEncaseCRLFWithFirstIndex
|
|
7427
|
-
};
|
|
7428
|
-
});
|
|
7429
|
-
|
|
7430
|
-
// ../../node_modules/chalk/source/templates.js
|
|
7431
|
-
var require_templates = __commonJS((exports, module) => {
|
|
7432
|
-
var TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
|
7433
|
-
var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
|
7434
|
-
var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
|
7435
|
-
var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
|
|
7436
|
-
var ESCAPES = new Map([
|
|
7437
|
-
["n", `
|
|
7438
|
-
`],
|
|
7439
|
-
["r", "\r"],
|
|
7440
|
-
["t", "\t"],
|
|
7441
|
-
["b", "\b"],
|
|
7442
|
-
["f", "\f"],
|
|
7443
|
-
["v", "\v"],
|
|
7444
|
-
["0", "\x00"],
|
|
7445
|
-
["\\", "\\"],
|
|
7446
|
-
["e", "\x1B"],
|
|
7447
|
-
["a", "\x07"]
|
|
7448
|
-
]);
|
|
7449
|
-
function unescape(c) {
|
|
7450
|
-
const u = c[0] === "u";
|
|
7451
|
-
const bracket = c[1] === "{";
|
|
7452
|
-
if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) {
|
|
7453
|
-
return String.fromCharCode(parseInt(c.slice(1), 16));
|
|
7454
|
-
}
|
|
7455
|
-
if (u && bracket) {
|
|
7456
|
-
return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
|
|
7457
|
-
}
|
|
7458
|
-
return ESCAPES.get(c) || c;
|
|
7459
|
-
}
|
|
7460
|
-
function parseArguments(name, arguments_) {
|
|
7461
|
-
const results = [];
|
|
7462
|
-
const chunks = arguments_.trim().split(/\s*,\s*/g);
|
|
7463
|
-
let matches;
|
|
7464
|
-
for (const chunk of chunks) {
|
|
7465
|
-
const number = Number(chunk);
|
|
7466
|
-
if (!Number.isNaN(number)) {
|
|
7467
|
-
results.push(number);
|
|
7468
|
-
} else if (matches = chunk.match(STRING_REGEX)) {
|
|
7469
|
-
results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));
|
|
7470
|
-
} else {
|
|
7471
|
-
throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
|
|
7472
|
-
}
|
|
7473
|
-
}
|
|
7474
|
-
return results;
|
|
7475
|
-
}
|
|
7476
|
-
function parseStyle(style) {
|
|
7477
|
-
STYLE_REGEX.lastIndex = 0;
|
|
7478
|
-
const results = [];
|
|
7479
|
-
let matches;
|
|
7480
|
-
while ((matches = STYLE_REGEX.exec(style)) !== null) {
|
|
7481
|
-
const name = matches[1];
|
|
7482
|
-
if (matches[2]) {
|
|
7483
|
-
const args = parseArguments(name, matches[2]);
|
|
7484
|
-
results.push([name].concat(args));
|
|
7485
|
-
} else {
|
|
7486
|
-
results.push([name]);
|
|
7487
|
-
}
|
|
7488
|
-
}
|
|
7489
|
-
return results;
|
|
7490
|
-
}
|
|
7491
|
-
function buildStyle(chalk, styles) {
|
|
7492
|
-
const enabled = {};
|
|
7493
|
-
for (const layer of styles) {
|
|
7494
|
-
for (const style of layer.styles) {
|
|
7495
|
-
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
7496
|
-
}
|
|
7497
|
-
}
|
|
7498
|
-
let current = chalk;
|
|
7499
|
-
for (const [styleName, styles2] of Object.entries(enabled)) {
|
|
7500
|
-
if (!Array.isArray(styles2)) {
|
|
7501
|
-
continue;
|
|
7502
|
-
}
|
|
7503
|
-
if (!(styleName in current)) {
|
|
7504
|
-
throw new Error(`Unknown Chalk style: ${styleName}`);
|
|
7505
|
-
}
|
|
7506
|
-
current = styles2.length > 0 ? current[styleName](...styles2) : current[styleName];
|
|
7507
|
-
}
|
|
7508
|
-
return current;
|
|
7509
|
-
}
|
|
7510
|
-
module.exports = (chalk, temporary) => {
|
|
7511
|
-
const styles = [];
|
|
7512
|
-
const chunks = [];
|
|
7513
|
-
let chunk = [];
|
|
7514
|
-
temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
|
|
7515
|
-
if (escapeCharacter) {
|
|
7516
|
-
chunk.push(unescape(escapeCharacter));
|
|
7517
|
-
} else if (style) {
|
|
7518
|
-
const string = chunk.join("");
|
|
7519
|
-
chunk = [];
|
|
7520
|
-
chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));
|
|
7521
|
-
styles.push({ inverse, styles: parseStyle(style) });
|
|
7522
|
-
} else if (close) {
|
|
7523
|
-
if (styles.length === 0) {
|
|
7524
|
-
throw new Error("Found extraneous } in Chalk template literal");
|
|
7525
|
-
}
|
|
7526
|
-
chunks.push(buildStyle(chalk, styles)(chunk.join("")));
|
|
7527
|
-
chunk = [];
|
|
7528
|
-
styles.pop();
|
|
7529
|
-
} else {
|
|
7530
|
-
chunk.push(character);
|
|
7531
|
-
}
|
|
7532
|
-
});
|
|
7533
|
-
chunks.push(chunk.join(""));
|
|
7534
|
-
if (styles.length > 0) {
|
|
7535
|
-
const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
|
|
7536
|
-
throw new Error(errMessage);
|
|
7537
|
-
}
|
|
7538
|
-
return chunks.join("");
|
|
7539
|
-
};
|
|
7540
|
-
});
|
|
7541
|
-
|
|
7542
|
-
// ../../node_modules/chalk/source/index.js
|
|
7543
|
-
var require_source = __commonJS((exports, module) => {
|
|
7544
|
-
var ansiStyles = require_ansi_styles();
|
|
7545
|
-
var { stdout: stdoutColor, stderr: stderrColor } = require_supports_color();
|
|
7546
|
-
var {
|
|
7547
|
-
stringReplaceAll,
|
|
7548
|
-
stringEncaseCRLFWithFirstIndex
|
|
7549
|
-
} = require_util2();
|
|
7550
|
-
var { isArray } = Array;
|
|
7551
|
-
var levelMapping = [
|
|
7552
|
-
"ansi",
|
|
7553
|
-
"ansi",
|
|
7554
|
-
"ansi256",
|
|
7555
|
-
"ansi16m"
|
|
7556
|
-
];
|
|
7557
|
-
var styles = Object.create(null);
|
|
7558
|
-
var applyOptions = (object, options = {}) => {
|
|
7559
|
-
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
7560
|
-
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
7561
|
-
}
|
|
7562
|
-
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
7563
|
-
object.level = options.level === undefined ? colorLevel : options.level;
|
|
7564
|
-
};
|
|
7565
|
-
|
|
7566
|
-
class ChalkClass {
|
|
7567
|
-
constructor(options) {
|
|
7568
|
-
return chalkFactory(options);
|
|
7569
|
-
}
|
|
7570
|
-
}
|
|
7571
|
-
var chalkFactory = (options) => {
|
|
7572
|
-
const chalk2 = {};
|
|
7573
|
-
applyOptions(chalk2, options);
|
|
7574
|
-
chalk2.template = (...arguments_) => chalkTag(chalk2.template, ...arguments_);
|
|
7575
|
-
Object.setPrototypeOf(chalk2, Chalk.prototype);
|
|
7576
|
-
Object.setPrototypeOf(chalk2.template, chalk2);
|
|
7577
|
-
chalk2.template.constructor = () => {
|
|
7578
|
-
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
7579
|
-
};
|
|
7580
|
-
chalk2.template.Instance = ChalkClass;
|
|
7581
|
-
return chalk2.template;
|
|
7582
|
-
};
|
|
7583
|
-
function Chalk(options) {
|
|
7584
|
-
return chalkFactory(options);
|
|
7585
|
-
}
|
|
7586
|
-
for (const [styleName, style] of Object.entries(ansiStyles)) {
|
|
7587
|
-
styles[styleName] = {
|
|
7588
|
-
get() {
|
|
7589
|
-
const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
|
|
7590
|
-
Object.defineProperty(this, styleName, { value: builder });
|
|
7591
|
-
return builder;
|
|
7592
|
-
}
|
|
7593
|
-
};
|
|
7594
|
-
}
|
|
7595
|
-
styles.visible = {
|
|
7596
|
-
get() {
|
|
7597
|
-
const builder = createBuilder(this, this._styler, true);
|
|
7598
|
-
Object.defineProperty(this, "visible", { value: builder });
|
|
7599
|
-
return builder;
|
|
7600
|
-
}
|
|
7601
|
-
};
|
|
7602
|
-
var usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
|
|
7603
|
-
for (const model of usedModels) {
|
|
7604
|
-
styles[model] = {
|
|
7605
|
-
get() {
|
|
7606
|
-
const { level } = this;
|
|
7607
|
-
return function(...arguments_) {
|
|
7608
|
-
const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
|
|
7609
|
-
return createBuilder(this, styler, this._isEmpty);
|
|
7610
|
-
};
|
|
7611
|
-
}
|
|
7612
|
-
};
|
|
7613
|
-
}
|
|
7614
|
-
for (const model of usedModels) {
|
|
7615
|
-
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
7616
|
-
styles[bgModel] = {
|
|
7617
|
-
get() {
|
|
7618
|
-
const { level } = this;
|
|
7619
|
-
return function(...arguments_) {
|
|
7620
|
-
const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
|
|
7621
|
-
return createBuilder(this, styler, this._isEmpty);
|
|
7622
|
-
};
|
|
7623
|
-
}
|
|
7624
|
-
};
|
|
7625
|
-
}
|
|
7626
|
-
var proto = Object.defineProperties(() => {}, {
|
|
7627
|
-
...styles,
|
|
7628
|
-
level: {
|
|
7629
|
-
enumerable: true,
|
|
7630
|
-
get() {
|
|
7631
|
-
return this._generator.level;
|
|
7632
|
-
},
|
|
7633
|
-
set(level) {
|
|
7634
|
-
this._generator.level = level;
|
|
7635
|
-
}
|
|
7636
|
-
}
|
|
7637
|
-
});
|
|
7638
|
-
var createStyler = (open, close, parent) => {
|
|
7639
|
-
let openAll;
|
|
7640
|
-
let closeAll;
|
|
7641
|
-
if (parent === undefined) {
|
|
7642
|
-
openAll = open;
|
|
7643
|
-
closeAll = close;
|
|
7644
|
-
} else {
|
|
7645
|
-
openAll = parent.openAll + open;
|
|
7646
|
-
closeAll = close + parent.closeAll;
|
|
7647
|
-
}
|
|
7648
|
-
return {
|
|
7649
|
-
open,
|
|
7650
|
-
close,
|
|
7651
|
-
openAll,
|
|
7652
|
-
closeAll,
|
|
7653
|
-
parent
|
|
7654
|
-
};
|
|
7655
|
-
};
|
|
7656
|
-
var createBuilder = (self, _styler, _isEmpty) => {
|
|
7657
|
-
const builder = (...arguments_) => {
|
|
7658
|
-
if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
|
|
7659
|
-
return applyStyle(builder, chalkTag(builder, ...arguments_));
|
|
7660
|
-
}
|
|
7661
|
-
return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
7662
|
-
};
|
|
7663
|
-
Object.setPrototypeOf(builder, proto);
|
|
7664
|
-
builder._generator = self;
|
|
7665
|
-
builder._styler = _styler;
|
|
7666
|
-
builder._isEmpty = _isEmpty;
|
|
7667
|
-
return builder;
|
|
7668
|
-
};
|
|
7669
|
-
var applyStyle = (self, string) => {
|
|
7670
|
-
if (self.level <= 0 || !string) {
|
|
7671
|
-
return self._isEmpty ? "" : string;
|
|
7672
|
-
}
|
|
7673
|
-
let styler = self._styler;
|
|
7674
|
-
if (styler === undefined) {
|
|
7675
|
-
return string;
|
|
7676
|
-
}
|
|
7677
|
-
const { openAll, closeAll } = styler;
|
|
7678
|
-
if (string.indexOf("\x1B") !== -1) {
|
|
7679
|
-
while (styler !== undefined) {
|
|
7680
|
-
string = stringReplaceAll(string, styler.close, styler.open);
|
|
7681
|
-
styler = styler.parent;
|
|
7682
|
-
}
|
|
7683
|
-
}
|
|
7684
|
-
const lfIndex = string.indexOf(`
|
|
7685
|
-
`);
|
|
7686
|
-
if (lfIndex !== -1) {
|
|
7687
|
-
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
7688
|
-
}
|
|
7689
|
-
return openAll + string + closeAll;
|
|
7690
|
-
};
|
|
7691
|
-
var template;
|
|
7692
|
-
var chalkTag = (chalk2, ...strings) => {
|
|
7693
|
-
const [firstString] = strings;
|
|
7694
|
-
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
|
7695
|
-
return strings.join(" ");
|
|
7696
|
-
}
|
|
7697
|
-
const arguments_ = strings.slice(1);
|
|
7698
|
-
const parts = [firstString.raw[0]];
|
|
7699
|
-
for (let i = 1;i < firstString.length; i++) {
|
|
7700
|
-
parts.push(String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"), String(firstString.raw[i]));
|
|
7701
|
-
}
|
|
7702
|
-
if (template === undefined) {
|
|
7703
|
-
template = require_templates();
|
|
7704
|
-
}
|
|
7705
|
-
return template(chalk2, parts.join(""));
|
|
7706
|
-
};
|
|
7707
|
-
Object.defineProperties(Chalk.prototype, styles);
|
|
7708
|
-
var chalk = Chalk();
|
|
7709
|
-
chalk.supportsColor = stdoutColor;
|
|
7710
|
-
chalk.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
7711
|
-
chalk.stderr.supportsColor = stderrColor;
|
|
7712
|
-
module.exports = chalk;
|
|
7713
|
-
});
|
|
7714
|
-
|
|
7715
|
-
// ../../node_modules/zod/v3/external.js
|
|
6197
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
|
|
7716
6198
|
var exports_external = {};
|
|
7717
6199
|
__export(exports_external, {
|
|
7718
6200
|
void: () => voidType,
|
|
@@ -7824,7 +6306,7 @@ __export(exports_external, {
|
|
|
7824
6306
|
BRAND: () => BRAND
|
|
7825
6307
|
});
|
|
7826
6308
|
|
|
7827
|
-
// ../../node_modules/zod/v3/helpers/util.js
|
|
6309
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
7828
6310
|
var util;
|
|
7829
6311
|
(function(util2) {
|
|
7830
6312
|
util2.assertEqual = (_) => {};
|
|
@@ -7955,7 +6437,7 @@ var getParsedType = (data) => {
|
|
|
7955
6437
|
}
|
|
7956
6438
|
};
|
|
7957
6439
|
|
|
7958
|
-
// ../../node_modules/zod/v3/ZodError.js
|
|
6440
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/ZodError.js
|
|
7959
6441
|
var ZodIssueCode = util.arrayToEnum([
|
|
7960
6442
|
"invalid_type",
|
|
7961
6443
|
"invalid_literal",
|
|
@@ -8074,7 +6556,7 @@ ZodError.create = (issues) => {
|
|
|
8074
6556
|
return error;
|
|
8075
6557
|
};
|
|
8076
6558
|
|
|
8077
|
-
// ../../node_modules/zod/v3/locales/en.js
|
|
6559
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/locales/en.js
|
|
8078
6560
|
var errorMap = (issue, _ctx) => {
|
|
8079
6561
|
let message;
|
|
8080
6562
|
switch (issue.code) {
|
|
@@ -8177,7 +6659,7 @@ var errorMap = (issue, _ctx) => {
|
|
|
8177
6659
|
};
|
|
8178
6660
|
var en_default = errorMap;
|
|
8179
6661
|
|
|
8180
|
-
// ../../node_modules/zod/v3/errors.js
|
|
6662
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/errors.js
|
|
8181
6663
|
var overrideErrorMap = en_default;
|
|
8182
6664
|
function setErrorMap(map) {
|
|
8183
6665
|
overrideErrorMap = map;
|
|
@@ -8185,7 +6667,7 @@ function setErrorMap(map) {
|
|
|
8185
6667
|
function getErrorMap() {
|
|
8186
6668
|
return overrideErrorMap;
|
|
8187
6669
|
}
|
|
8188
|
-
// ../../node_modules/zod/v3/helpers/parseUtil.js
|
|
6670
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
8189
6671
|
var makeIssue = (params) => {
|
|
8190
6672
|
const { data, path, errorMaps, issueData } = params;
|
|
8191
6673
|
const fullPath = [...path, ...issueData.path || []];
|
|
@@ -8291,14 +6773,14 @@ var isAborted = (x) => x.status === "aborted";
|
|
|
8291
6773
|
var isDirty = (x) => x.status === "dirty";
|
|
8292
6774
|
var isValid = (x) => x.status === "valid";
|
|
8293
6775
|
var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
8294
|
-
// ../../node_modules/zod/v3/helpers/errorUtil.js
|
|
6776
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
|
|
8295
6777
|
var errorUtil;
|
|
8296
6778
|
(function(errorUtil2) {
|
|
8297
6779
|
errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
8298
6780
|
errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
|
|
8299
6781
|
})(errorUtil || (errorUtil = {}));
|
|
8300
6782
|
|
|
8301
|
-
// ../../node_modules/zod/v3/types.js
|
|
6783
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/types.js
|
|
8302
6784
|
class ParseInputLazyPath {
|
|
8303
6785
|
constructor(parent, value, path, key) {
|
|
8304
6786
|
this._cachedPath = [];
|
|
@@ -11685,14 +10167,9 @@ var coerce = {
|
|
|
11685
10167
|
date: (arg) => ZodDate.create({ ...arg, coerce: true })
|
|
11686
10168
|
};
|
|
11687
10169
|
var NEVER = INVALID;
|
|
11688
|
-
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
10170
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
11689
10171
|
var LATEST_PROTOCOL_VERSION = "2025-06-18";
|
|
11690
|
-
var SUPPORTED_PROTOCOL_VERSIONS = [
|
|
11691
|
-
LATEST_PROTOCOL_VERSION,
|
|
11692
|
-
"2025-03-26",
|
|
11693
|
-
"2024-11-05",
|
|
11694
|
-
"2024-10-07"
|
|
11695
|
-
];
|
|
10172
|
+
var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-03-26", "2024-11-05", "2024-10-07"];
|
|
11696
10173
|
var JSONRPC_VERSION = "2.0";
|
|
11697
10174
|
var ProgressTokenSchema = exports_external.union([exports_external.string(), exports_external.number().int()]);
|
|
11698
10175
|
var CursorSchema = exports_external.string();
|
|
@@ -11752,12 +10229,7 @@ var JSONRPCErrorSchema = exports_external.object({
|
|
|
11752
10229
|
})
|
|
11753
10230
|
}).strict();
|
|
11754
10231
|
var isJSONRPCError = (value) => JSONRPCErrorSchema.safeParse(value).success;
|
|
11755
|
-
var JSONRPCMessageSchema = exports_external.union([
|
|
11756
|
-
JSONRPCRequestSchema,
|
|
11757
|
-
JSONRPCNotificationSchema,
|
|
11758
|
-
JSONRPCResponseSchema,
|
|
11759
|
-
JSONRPCErrorSchema
|
|
11760
|
-
]);
|
|
10232
|
+
var JSONRPCMessageSchema = exports_external.union([JSONRPCRequestSchema, JSONRPCNotificationSchema, JSONRPCResponseSchema, JSONRPCErrorSchema]);
|
|
11761
10233
|
var EmptyResultSchema = ResultSchema.strict();
|
|
11762
10234
|
var CancelledNotificationSchema = NotificationSchema.extend({
|
|
11763
10235
|
method: exports_external.literal("notifications/cancelled"),
|
|
@@ -11766,13 +10238,22 @@ var CancelledNotificationSchema = NotificationSchema.extend({
|
|
|
11766
10238
|
reason: exports_external.string().optional()
|
|
11767
10239
|
})
|
|
11768
10240
|
});
|
|
10241
|
+
var IconSchema = exports_external.object({
|
|
10242
|
+
src: exports_external.string(),
|
|
10243
|
+
mimeType: exports_external.optional(exports_external.string()),
|
|
10244
|
+
sizes: exports_external.optional(exports_external.array(exports_external.string()))
|
|
10245
|
+
}).passthrough();
|
|
10246
|
+
var IconsSchema = exports_external.object({
|
|
10247
|
+
icons: exports_external.array(IconSchema).optional()
|
|
10248
|
+
}).passthrough();
|
|
11769
10249
|
var BaseMetadataSchema = exports_external.object({
|
|
11770
10250
|
name: exports_external.string(),
|
|
11771
10251
|
title: exports_external.optional(exports_external.string())
|
|
11772
10252
|
}).passthrough();
|
|
11773
10253
|
var ImplementationSchema = BaseMetadataSchema.extend({
|
|
11774
|
-
version: exports_external.string()
|
|
11775
|
-
|
|
10254
|
+
version: exports_external.string(),
|
|
10255
|
+
websiteUrl: exports_external.optional(exports_external.string())
|
|
10256
|
+
}).merge(IconsSchema);
|
|
11776
10257
|
var ClientCapabilitiesSchema = exports_external.object({
|
|
11777
10258
|
experimental: exports_external.optional(exports_external.object({}).passthrough()),
|
|
11778
10259
|
sampling: exports_external.optional(exports_external.object({}).passthrough()),
|
|
@@ -11859,13 +10340,13 @@ var ResourceSchema = BaseMetadataSchema.extend({
|
|
|
11859
10340
|
description: exports_external.optional(exports_external.string()),
|
|
11860
10341
|
mimeType: exports_external.optional(exports_external.string()),
|
|
11861
10342
|
_meta: exports_external.optional(exports_external.object({}).passthrough())
|
|
11862
|
-
});
|
|
10343
|
+
}).merge(IconsSchema);
|
|
11863
10344
|
var ResourceTemplateSchema = BaseMetadataSchema.extend({
|
|
11864
10345
|
uriTemplate: exports_external.string(),
|
|
11865
10346
|
description: exports_external.optional(exports_external.string()),
|
|
11866
10347
|
mimeType: exports_external.optional(exports_external.string()),
|
|
11867
10348
|
_meta: exports_external.optional(exports_external.object({}).passthrough())
|
|
11868
|
-
});
|
|
10349
|
+
}).merge(IconsSchema);
|
|
11869
10350
|
var ListResourcesRequestSchema = PaginatedRequestSchema.extend({
|
|
11870
10351
|
method: exports_external.literal("resources/list")
|
|
11871
10352
|
});
|
|
@@ -11917,7 +10398,7 @@ var PromptSchema = BaseMetadataSchema.extend({
|
|
|
11917
10398
|
description: exports_external.optional(exports_external.string()),
|
|
11918
10399
|
arguments: exports_external.optional(exports_external.array(PromptArgumentSchema)),
|
|
11919
10400
|
_meta: exports_external.optional(exports_external.object({}).passthrough())
|
|
11920
|
-
});
|
|
10401
|
+
}).merge(IconsSchema);
|
|
11921
10402
|
var ListPromptsRequestSchema = PaginatedRequestSchema.extend({
|
|
11922
10403
|
method: exports_external.literal("prompts/list")
|
|
11923
10404
|
});
|
|
@@ -11995,7 +10476,7 @@ var ToolSchema = BaseMetadataSchema.extend({
|
|
|
11995
10476
|
}).passthrough()),
|
|
11996
10477
|
annotations: exports_external.optional(ToolAnnotationsSchema),
|
|
11997
10478
|
_meta: exports_external.optional(exports_external.object({}).passthrough())
|
|
11998
|
-
});
|
|
10479
|
+
}).merge(IconsSchema);
|
|
11999
10480
|
var ListToolsRequestSchema = PaginatedRequestSchema.extend({
|
|
12000
10481
|
method: exports_external.literal("tools/list")
|
|
12001
10482
|
});
|
|
@@ -12020,16 +10501,7 @@ var CallToolRequestSchema = RequestSchema.extend({
|
|
|
12020
10501
|
var ToolListChangedNotificationSchema = NotificationSchema.extend({
|
|
12021
10502
|
method: exports_external.literal("notifications/tools/list_changed")
|
|
12022
10503
|
});
|
|
12023
|
-
var LoggingLevelSchema = exports_external.enum([
|
|
12024
|
-
"debug",
|
|
12025
|
-
"info",
|
|
12026
|
-
"notice",
|
|
12027
|
-
"warning",
|
|
12028
|
-
"error",
|
|
12029
|
-
"critical",
|
|
12030
|
-
"alert",
|
|
12031
|
-
"emergency"
|
|
12032
|
-
]);
|
|
10504
|
+
var LoggingLevelSchema = exports_external.enum(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]);
|
|
12033
10505
|
var SetLevelRequestSchema = RequestSchema.extend({
|
|
12034
10506
|
method: exports_external.literal("logging/setLevel"),
|
|
12035
10507
|
params: BaseRequestParamsSchema.extend({
|
|
@@ -12074,11 +10546,7 @@ var CreateMessageResultSchema = ResultSchema.extend({
|
|
|
12074
10546
|
model: exports_external.string(),
|
|
12075
10547
|
stopReason: exports_external.optional(exports_external.enum(["endTurn", "stopSequence", "maxTokens"]).or(exports_external.string())),
|
|
12076
10548
|
role: exports_external.enum(["user", "assistant"]),
|
|
12077
|
-
content: exports_external.discriminatedUnion("type", [
|
|
12078
|
-
TextContentSchema,
|
|
12079
|
-
ImageContentSchema,
|
|
12080
|
-
AudioContentSchema
|
|
12081
|
-
])
|
|
10549
|
+
content: exports_external.discriminatedUnion("type", [TextContentSchema, ImageContentSchema, AudioContentSchema])
|
|
12082
10550
|
});
|
|
12083
10551
|
var BooleanSchemaSchema = exports_external.object({
|
|
12084
10552
|
type: exports_external.literal("boolean"),
|
|
@@ -12108,12 +10576,7 @@ var EnumSchemaSchema = exports_external.object({
|
|
|
12108
10576
|
enum: exports_external.array(exports_external.string()),
|
|
12109
10577
|
enumNames: exports_external.optional(exports_external.array(exports_external.string()))
|
|
12110
10578
|
}).passthrough();
|
|
12111
|
-
var PrimitiveSchemaDefinitionSchema = exports_external.union([
|
|
12112
|
-
BooleanSchemaSchema,
|
|
12113
|
-
StringSchemaSchema,
|
|
12114
|
-
NumberSchemaSchema,
|
|
12115
|
-
EnumSchemaSchema
|
|
12116
|
-
]);
|
|
10579
|
+
var PrimitiveSchemaDefinitionSchema = exports_external.union([BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema, EnumSchemaSchema]);
|
|
12117
10580
|
var ElicitRequestSchema = RequestSchema.extend({
|
|
12118
10581
|
method: exports_external.literal("elicitation/create"),
|
|
12119
10582
|
params: BaseRequestParamsSchema.extend({
|
|
@@ -12192,18 +10655,8 @@ var ClientNotificationSchema = exports_external.union([
|
|
|
12192
10655
|
InitializedNotificationSchema,
|
|
12193
10656
|
RootsListChangedNotificationSchema
|
|
12194
10657
|
]);
|
|
12195
|
-
var ClientResultSchema = exports_external.union([
|
|
12196
|
-
|
|
12197
|
-
CreateMessageResultSchema,
|
|
12198
|
-
ElicitResultSchema,
|
|
12199
|
-
ListRootsResultSchema
|
|
12200
|
-
]);
|
|
12201
|
-
var ServerRequestSchema = exports_external.union([
|
|
12202
|
-
PingRequestSchema,
|
|
12203
|
-
CreateMessageRequestSchema,
|
|
12204
|
-
ElicitRequestSchema,
|
|
12205
|
-
ListRootsRequestSchema
|
|
12206
|
-
]);
|
|
10658
|
+
var ClientResultSchema = exports_external.union([EmptyResultSchema, CreateMessageResultSchema, ElicitResultSchema, ListRootsResultSchema]);
|
|
10659
|
+
var ServerRequestSchema = exports_external.union([PingRequestSchema, CreateMessageRequestSchema, ElicitRequestSchema, ListRootsRequestSchema]);
|
|
12207
10660
|
var ServerNotificationSchema = exports_external.union([
|
|
12208
10661
|
CancelledNotificationSchema,
|
|
12209
10662
|
ProgressNotificationSchema,
|
|
@@ -12235,7 +10688,7 @@ class McpError extends Error {
|
|
|
12235
10688
|
}
|
|
12236
10689
|
}
|
|
12237
10690
|
|
|
12238
|
-
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
|
|
10691
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
|
|
12239
10692
|
var DEFAULT_REQUEST_TIMEOUT_MSEC = 60000;
|
|
12240
10693
|
|
|
12241
10694
|
class Protocol {
|
|
@@ -12275,7 +10728,10 @@ class Protocol {
|
|
|
12275
10728
|
const totalElapsed = Date.now() - info.startTime;
|
|
12276
10729
|
if (info.maxTotalTimeout && totalElapsed >= info.maxTotalTimeout) {
|
|
12277
10730
|
this._timeoutInfo.delete(messageId);
|
|
12278
|
-
throw new McpError(ErrorCode.RequestTimeout, "Maximum total timeout exceeded", {
|
|
10731
|
+
throw new McpError(ErrorCode.RequestTimeout, "Maximum total timeout exceeded", {
|
|
10732
|
+
maxTotalTimeout: info.maxTotalTimeout,
|
|
10733
|
+
totalElapsed
|
|
10734
|
+
});
|
|
12279
10735
|
}
|
|
12280
10736
|
clearTimeout(info.timeoutId);
|
|
12281
10737
|
info.timeoutId = setTimeout(info.onTimeout, info.timeout);
|
|
@@ -12575,7 +11031,7 @@ function mergeCapabilities(base, additional) {
|
|
|
12575
11031
|
}, { ...base });
|
|
12576
11032
|
}
|
|
12577
11033
|
|
|
12578
|
-
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
|
|
11034
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
|
|
12579
11035
|
var import_ajv = __toESM(require_ajv(), 1);
|
|
12580
11036
|
|
|
12581
11037
|
class Server extends Protocol {
|
|
@@ -12602,7 +11058,7 @@ class Server extends Protocol {
|
|
|
12602
11058
|
const transportSessionId = extra.sessionId || ((_a2 = extra.requestInfo) === null || _a2 === undefined ? undefined : _a2.headers["mcp-session-id"]) || undefined;
|
|
12603
11059
|
const { level } = request.params;
|
|
12604
11060
|
const parseResult = LoggingLevelSchema.safeParse(level);
|
|
12605
|
-
if (
|
|
11061
|
+
if (parseResult.success) {
|
|
12606
11062
|
this._loggingLevels.set(transportSessionId, parseResult.data);
|
|
12607
11063
|
}
|
|
12608
11064
|
return {};
|
|
@@ -12753,7 +11209,7 @@ class Server extends Protocol {
|
|
|
12753
11209
|
}
|
|
12754
11210
|
async sendLoggingMessage(params, sessionId) {
|
|
12755
11211
|
if (this._capabilities.logging) {
|
|
12756
|
-
if (!
|
|
11212
|
+
if (!this.isMessageIgnored(params.level, sessionId)) {
|
|
12757
11213
|
return this.notification({ method: "notifications/message", params });
|
|
12758
11214
|
}
|
|
12759
11215
|
}
|
|
@@ -12777,10 +11233,10 @@ class Server extends Protocol {
|
|
|
12777
11233
|
}
|
|
12778
11234
|
}
|
|
12779
11235
|
|
|
12780
|
-
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
11236
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
12781
11237
|
import process2 from "process";
|
|
12782
11238
|
|
|
12783
|
-
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
11239
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
12784
11240
|
class ReadBuffer {
|
|
12785
11241
|
append(chunk) {
|
|
12786
11242
|
this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
|
|
@@ -12810,7 +11266,7 @@ function serializeMessage(message) {
|
|
|
12810
11266
|
`;
|
|
12811
11267
|
}
|
|
12812
11268
|
|
|
12813
|
-
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
11269
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
12814
11270
|
class StdioServerTransport {
|
|
12815
11271
|
constructor(_stdin = process2.stdin, _stdout = process2.stdout) {
|
|
12816
11272
|
this._stdin = _stdin;
|
|
@@ -12871,9 +11327,496 @@ class StdioServerTransport {
|
|
|
12871
11327
|
}
|
|
12872
11328
|
}
|
|
12873
11329
|
|
|
12874
|
-
//
|
|
12875
|
-
var
|
|
11330
|
+
// ../../node_modules/.bun/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
11331
|
+
var ANSI_BACKGROUND_OFFSET = 10;
|
|
11332
|
+
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
11333
|
+
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
11334
|
+
var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
11335
|
+
var styles = {
|
|
11336
|
+
modifier: {
|
|
11337
|
+
reset: [0, 0],
|
|
11338
|
+
bold: [1, 22],
|
|
11339
|
+
dim: [2, 22],
|
|
11340
|
+
italic: [3, 23],
|
|
11341
|
+
underline: [4, 24],
|
|
11342
|
+
overline: [53, 55],
|
|
11343
|
+
inverse: [7, 27],
|
|
11344
|
+
hidden: [8, 28],
|
|
11345
|
+
strikethrough: [9, 29]
|
|
11346
|
+
},
|
|
11347
|
+
color: {
|
|
11348
|
+
black: [30, 39],
|
|
11349
|
+
red: [31, 39],
|
|
11350
|
+
green: [32, 39],
|
|
11351
|
+
yellow: [33, 39],
|
|
11352
|
+
blue: [34, 39],
|
|
11353
|
+
magenta: [35, 39],
|
|
11354
|
+
cyan: [36, 39],
|
|
11355
|
+
white: [37, 39],
|
|
11356
|
+
blackBright: [90, 39],
|
|
11357
|
+
gray: [90, 39],
|
|
11358
|
+
grey: [90, 39],
|
|
11359
|
+
redBright: [91, 39],
|
|
11360
|
+
greenBright: [92, 39],
|
|
11361
|
+
yellowBright: [93, 39],
|
|
11362
|
+
blueBright: [94, 39],
|
|
11363
|
+
magentaBright: [95, 39],
|
|
11364
|
+
cyanBright: [96, 39],
|
|
11365
|
+
whiteBright: [97, 39]
|
|
11366
|
+
},
|
|
11367
|
+
bgColor: {
|
|
11368
|
+
bgBlack: [40, 49],
|
|
11369
|
+
bgRed: [41, 49],
|
|
11370
|
+
bgGreen: [42, 49],
|
|
11371
|
+
bgYellow: [43, 49],
|
|
11372
|
+
bgBlue: [44, 49],
|
|
11373
|
+
bgMagenta: [45, 49],
|
|
11374
|
+
bgCyan: [46, 49],
|
|
11375
|
+
bgWhite: [47, 49],
|
|
11376
|
+
bgBlackBright: [100, 49],
|
|
11377
|
+
bgGray: [100, 49],
|
|
11378
|
+
bgGrey: [100, 49],
|
|
11379
|
+
bgRedBright: [101, 49],
|
|
11380
|
+
bgGreenBright: [102, 49],
|
|
11381
|
+
bgYellowBright: [103, 49],
|
|
11382
|
+
bgBlueBright: [104, 49],
|
|
11383
|
+
bgMagentaBright: [105, 49],
|
|
11384
|
+
bgCyanBright: [106, 49],
|
|
11385
|
+
bgWhiteBright: [107, 49]
|
|
11386
|
+
}
|
|
11387
|
+
};
|
|
11388
|
+
var modifierNames = Object.keys(styles.modifier);
|
|
11389
|
+
var foregroundColorNames = Object.keys(styles.color);
|
|
11390
|
+
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
11391
|
+
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
11392
|
+
function assembleStyles() {
|
|
11393
|
+
const codes = new Map;
|
|
11394
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
11395
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
11396
|
+
styles[styleName] = {
|
|
11397
|
+
open: `\x1B[${style[0]}m`,
|
|
11398
|
+
close: `\x1B[${style[1]}m`
|
|
11399
|
+
};
|
|
11400
|
+
group[styleName] = styles[styleName];
|
|
11401
|
+
codes.set(style[0], style[1]);
|
|
11402
|
+
}
|
|
11403
|
+
Object.defineProperty(styles, groupName, {
|
|
11404
|
+
value: group,
|
|
11405
|
+
enumerable: false
|
|
11406
|
+
});
|
|
11407
|
+
}
|
|
11408
|
+
Object.defineProperty(styles, "codes", {
|
|
11409
|
+
value: codes,
|
|
11410
|
+
enumerable: false
|
|
11411
|
+
});
|
|
11412
|
+
styles.color.close = "\x1B[39m";
|
|
11413
|
+
styles.bgColor.close = "\x1B[49m";
|
|
11414
|
+
styles.color.ansi = wrapAnsi16();
|
|
11415
|
+
styles.color.ansi256 = wrapAnsi256();
|
|
11416
|
+
styles.color.ansi16m = wrapAnsi16m();
|
|
11417
|
+
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
11418
|
+
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
11419
|
+
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
11420
|
+
Object.defineProperties(styles, {
|
|
11421
|
+
rgbToAnsi256: {
|
|
11422
|
+
value(red, green, blue) {
|
|
11423
|
+
if (red === green && green === blue) {
|
|
11424
|
+
if (red < 8) {
|
|
11425
|
+
return 16;
|
|
11426
|
+
}
|
|
11427
|
+
if (red > 248) {
|
|
11428
|
+
return 231;
|
|
11429
|
+
}
|
|
11430
|
+
return Math.round((red - 8) / 247 * 24) + 232;
|
|
11431
|
+
}
|
|
11432
|
+
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
11433
|
+
},
|
|
11434
|
+
enumerable: false
|
|
11435
|
+
},
|
|
11436
|
+
hexToRgb: {
|
|
11437
|
+
value(hex) {
|
|
11438
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
11439
|
+
if (!matches) {
|
|
11440
|
+
return [0, 0, 0];
|
|
11441
|
+
}
|
|
11442
|
+
let [colorString] = matches;
|
|
11443
|
+
if (colorString.length === 3) {
|
|
11444
|
+
colorString = [...colorString].map((character) => character + character).join("");
|
|
11445
|
+
}
|
|
11446
|
+
const integer = Number.parseInt(colorString, 16);
|
|
11447
|
+
return [
|
|
11448
|
+
integer >> 16 & 255,
|
|
11449
|
+
integer >> 8 & 255,
|
|
11450
|
+
integer & 255
|
|
11451
|
+
];
|
|
11452
|
+
},
|
|
11453
|
+
enumerable: false
|
|
11454
|
+
},
|
|
11455
|
+
hexToAnsi256: {
|
|
11456
|
+
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
11457
|
+
enumerable: false
|
|
11458
|
+
},
|
|
11459
|
+
ansi256ToAnsi: {
|
|
11460
|
+
value(code) {
|
|
11461
|
+
if (code < 8) {
|
|
11462
|
+
return 30 + code;
|
|
11463
|
+
}
|
|
11464
|
+
if (code < 16) {
|
|
11465
|
+
return 90 + (code - 8);
|
|
11466
|
+
}
|
|
11467
|
+
let red;
|
|
11468
|
+
let green;
|
|
11469
|
+
let blue;
|
|
11470
|
+
if (code >= 232) {
|
|
11471
|
+
red = ((code - 232) * 10 + 8) / 255;
|
|
11472
|
+
green = red;
|
|
11473
|
+
blue = red;
|
|
11474
|
+
} else {
|
|
11475
|
+
code -= 16;
|
|
11476
|
+
const remainder = code % 36;
|
|
11477
|
+
red = Math.floor(code / 36) / 5;
|
|
11478
|
+
green = Math.floor(remainder / 6) / 5;
|
|
11479
|
+
blue = remainder % 6 / 5;
|
|
11480
|
+
}
|
|
11481
|
+
const value = Math.max(red, green, blue) * 2;
|
|
11482
|
+
if (value === 0) {
|
|
11483
|
+
return 30;
|
|
11484
|
+
}
|
|
11485
|
+
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
11486
|
+
if (value === 2) {
|
|
11487
|
+
result += 60;
|
|
11488
|
+
}
|
|
11489
|
+
return result;
|
|
11490
|
+
},
|
|
11491
|
+
enumerable: false
|
|
11492
|
+
},
|
|
11493
|
+
rgbToAnsi: {
|
|
11494
|
+
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
11495
|
+
enumerable: false
|
|
11496
|
+
},
|
|
11497
|
+
hexToAnsi: {
|
|
11498
|
+
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
11499
|
+
enumerable: false
|
|
11500
|
+
}
|
|
11501
|
+
});
|
|
11502
|
+
return styles;
|
|
11503
|
+
}
|
|
11504
|
+
var ansiStyles = assembleStyles();
|
|
11505
|
+
var ansi_styles_default = ansiStyles;
|
|
11506
|
+
|
|
11507
|
+
// ../../node_modules/.bun/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
|
|
11508
|
+
import process3 from "process";
|
|
11509
|
+
import os from "os";
|
|
11510
|
+
import tty from "tty";
|
|
11511
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process3.argv) {
|
|
11512
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
11513
|
+
const position = argv.indexOf(prefix + flag);
|
|
11514
|
+
const terminatorPosition = argv.indexOf("--");
|
|
11515
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
11516
|
+
}
|
|
11517
|
+
var { env } = process3;
|
|
11518
|
+
var flagForceColor;
|
|
11519
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
11520
|
+
flagForceColor = 0;
|
|
11521
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
11522
|
+
flagForceColor = 1;
|
|
11523
|
+
}
|
|
11524
|
+
function envForceColor() {
|
|
11525
|
+
if ("FORCE_COLOR" in env) {
|
|
11526
|
+
if (env.FORCE_COLOR === "true") {
|
|
11527
|
+
return 1;
|
|
11528
|
+
}
|
|
11529
|
+
if (env.FORCE_COLOR === "false") {
|
|
11530
|
+
return 0;
|
|
11531
|
+
}
|
|
11532
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
11533
|
+
}
|
|
11534
|
+
}
|
|
11535
|
+
function translateLevel(level) {
|
|
11536
|
+
if (level === 0) {
|
|
11537
|
+
return false;
|
|
11538
|
+
}
|
|
11539
|
+
return {
|
|
11540
|
+
level,
|
|
11541
|
+
hasBasic: true,
|
|
11542
|
+
has256: level >= 2,
|
|
11543
|
+
has16m: level >= 3
|
|
11544
|
+
};
|
|
11545
|
+
}
|
|
11546
|
+
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
11547
|
+
const noFlagForceColor = envForceColor();
|
|
11548
|
+
if (noFlagForceColor !== undefined) {
|
|
11549
|
+
flagForceColor = noFlagForceColor;
|
|
11550
|
+
}
|
|
11551
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
11552
|
+
if (forceColor === 0) {
|
|
11553
|
+
return 0;
|
|
11554
|
+
}
|
|
11555
|
+
if (sniffFlags) {
|
|
11556
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
11557
|
+
return 3;
|
|
11558
|
+
}
|
|
11559
|
+
if (hasFlag("color=256")) {
|
|
11560
|
+
return 2;
|
|
11561
|
+
}
|
|
11562
|
+
}
|
|
11563
|
+
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
|
11564
|
+
return 1;
|
|
11565
|
+
}
|
|
11566
|
+
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
11567
|
+
return 0;
|
|
11568
|
+
}
|
|
11569
|
+
const min = forceColor || 0;
|
|
11570
|
+
if (env.TERM === "dumb") {
|
|
11571
|
+
return min;
|
|
11572
|
+
}
|
|
11573
|
+
if (process3.platform === "win32") {
|
|
11574
|
+
const osRelease = os.release().split(".");
|
|
11575
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
11576
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
11577
|
+
}
|
|
11578
|
+
return 1;
|
|
11579
|
+
}
|
|
11580
|
+
if ("CI" in env) {
|
|
11581
|
+
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env))) {
|
|
11582
|
+
return 3;
|
|
11583
|
+
}
|
|
11584
|
+
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
|
|
11585
|
+
return 1;
|
|
11586
|
+
}
|
|
11587
|
+
return min;
|
|
11588
|
+
}
|
|
11589
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
11590
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
11591
|
+
}
|
|
11592
|
+
if (env.COLORTERM === "truecolor") {
|
|
11593
|
+
return 3;
|
|
11594
|
+
}
|
|
11595
|
+
if (env.TERM === "xterm-kitty") {
|
|
11596
|
+
return 3;
|
|
11597
|
+
}
|
|
11598
|
+
if (env.TERM === "xterm-ghostty") {
|
|
11599
|
+
return 3;
|
|
11600
|
+
}
|
|
11601
|
+
if (env.TERM === "wezterm") {
|
|
11602
|
+
return 3;
|
|
11603
|
+
}
|
|
11604
|
+
if ("TERM_PROGRAM" in env) {
|
|
11605
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
11606
|
+
switch (env.TERM_PROGRAM) {
|
|
11607
|
+
case "iTerm.app": {
|
|
11608
|
+
return version >= 3 ? 3 : 2;
|
|
11609
|
+
}
|
|
11610
|
+
case "Apple_Terminal": {
|
|
11611
|
+
return 2;
|
|
11612
|
+
}
|
|
11613
|
+
}
|
|
11614
|
+
}
|
|
11615
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
11616
|
+
return 2;
|
|
11617
|
+
}
|
|
11618
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
11619
|
+
return 1;
|
|
11620
|
+
}
|
|
11621
|
+
if ("COLORTERM" in env) {
|
|
11622
|
+
return 1;
|
|
11623
|
+
}
|
|
11624
|
+
return min;
|
|
11625
|
+
}
|
|
11626
|
+
function createSupportsColor(stream, options = {}) {
|
|
11627
|
+
const level = _supportsColor(stream, {
|
|
11628
|
+
streamIsTTY: stream && stream.isTTY,
|
|
11629
|
+
...options
|
|
11630
|
+
});
|
|
11631
|
+
return translateLevel(level);
|
|
11632
|
+
}
|
|
11633
|
+
var supportsColor = {
|
|
11634
|
+
stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
|
|
11635
|
+
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
11636
|
+
};
|
|
11637
|
+
var supports_color_default = supportsColor;
|
|
11638
|
+
|
|
11639
|
+
// ../../node_modules/.bun/chalk@5.6.2/node_modules/chalk/source/utilities.js
|
|
11640
|
+
function stringReplaceAll(string, substring, replacer) {
|
|
11641
|
+
let index = string.indexOf(substring);
|
|
11642
|
+
if (index === -1) {
|
|
11643
|
+
return string;
|
|
11644
|
+
}
|
|
11645
|
+
const substringLength = substring.length;
|
|
11646
|
+
let endIndex = 0;
|
|
11647
|
+
let returnValue = "";
|
|
11648
|
+
do {
|
|
11649
|
+
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
11650
|
+
endIndex = index + substringLength;
|
|
11651
|
+
index = string.indexOf(substring, endIndex);
|
|
11652
|
+
} while (index !== -1);
|
|
11653
|
+
returnValue += string.slice(endIndex);
|
|
11654
|
+
return returnValue;
|
|
11655
|
+
}
|
|
11656
|
+
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
11657
|
+
let endIndex = 0;
|
|
11658
|
+
let returnValue = "";
|
|
11659
|
+
do {
|
|
11660
|
+
const gotCR = string[index - 1] === "\r";
|
|
11661
|
+
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? `\r
|
|
11662
|
+
` : `
|
|
11663
|
+
`) + postfix;
|
|
11664
|
+
endIndex = index + 1;
|
|
11665
|
+
index = string.indexOf(`
|
|
11666
|
+
`, endIndex);
|
|
11667
|
+
} while (index !== -1);
|
|
11668
|
+
returnValue += string.slice(endIndex);
|
|
11669
|
+
return returnValue;
|
|
11670
|
+
}
|
|
12876
11671
|
|
|
11672
|
+
// ../../node_modules/.bun/chalk@5.6.2/node_modules/chalk/source/index.js
|
|
11673
|
+
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
11674
|
+
var GENERATOR = Symbol("GENERATOR");
|
|
11675
|
+
var STYLER = Symbol("STYLER");
|
|
11676
|
+
var IS_EMPTY = Symbol("IS_EMPTY");
|
|
11677
|
+
var levelMapping = [
|
|
11678
|
+
"ansi",
|
|
11679
|
+
"ansi",
|
|
11680
|
+
"ansi256",
|
|
11681
|
+
"ansi16m"
|
|
11682
|
+
];
|
|
11683
|
+
var styles2 = Object.create(null);
|
|
11684
|
+
var applyOptions = (object, options = {}) => {
|
|
11685
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
11686
|
+
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
11687
|
+
}
|
|
11688
|
+
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
11689
|
+
object.level = options.level === undefined ? colorLevel : options.level;
|
|
11690
|
+
};
|
|
11691
|
+
var chalkFactory = (options) => {
|
|
11692
|
+
const chalk = (...strings) => strings.join(" ");
|
|
11693
|
+
applyOptions(chalk, options);
|
|
11694
|
+
Object.setPrototypeOf(chalk, createChalk.prototype);
|
|
11695
|
+
return chalk;
|
|
11696
|
+
};
|
|
11697
|
+
function createChalk(options) {
|
|
11698
|
+
return chalkFactory(options);
|
|
11699
|
+
}
|
|
11700
|
+
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
11701
|
+
for (const [styleName, style] of Object.entries(ansi_styles_default)) {
|
|
11702
|
+
styles2[styleName] = {
|
|
11703
|
+
get() {
|
|
11704
|
+
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
11705
|
+
Object.defineProperty(this, styleName, { value: builder });
|
|
11706
|
+
return builder;
|
|
11707
|
+
}
|
|
11708
|
+
};
|
|
11709
|
+
}
|
|
11710
|
+
styles2.visible = {
|
|
11711
|
+
get() {
|
|
11712
|
+
const builder = createBuilder(this, this[STYLER], true);
|
|
11713
|
+
Object.defineProperty(this, "visible", { value: builder });
|
|
11714
|
+
return builder;
|
|
11715
|
+
}
|
|
11716
|
+
};
|
|
11717
|
+
var getModelAnsi = (model, level, type, ...arguments_) => {
|
|
11718
|
+
if (model === "rgb") {
|
|
11719
|
+
if (level === "ansi16m") {
|
|
11720
|
+
return ansi_styles_default[type].ansi16m(...arguments_);
|
|
11721
|
+
}
|
|
11722
|
+
if (level === "ansi256") {
|
|
11723
|
+
return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
|
|
11724
|
+
}
|
|
11725
|
+
return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
|
|
11726
|
+
}
|
|
11727
|
+
if (model === "hex") {
|
|
11728
|
+
return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
|
|
11729
|
+
}
|
|
11730
|
+
return ansi_styles_default[type][model](...arguments_);
|
|
11731
|
+
};
|
|
11732
|
+
var usedModels = ["rgb", "hex", "ansi256"];
|
|
11733
|
+
for (const model of usedModels) {
|
|
11734
|
+
styles2[model] = {
|
|
11735
|
+
get() {
|
|
11736
|
+
const { level } = this;
|
|
11737
|
+
return function(...arguments_) {
|
|
11738
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
|
|
11739
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
11740
|
+
};
|
|
11741
|
+
}
|
|
11742
|
+
};
|
|
11743
|
+
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
11744
|
+
styles2[bgModel] = {
|
|
11745
|
+
get() {
|
|
11746
|
+
const { level } = this;
|
|
11747
|
+
return function(...arguments_) {
|
|
11748
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
|
|
11749
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
11750
|
+
};
|
|
11751
|
+
}
|
|
11752
|
+
};
|
|
11753
|
+
}
|
|
11754
|
+
var proto = Object.defineProperties(() => {}, {
|
|
11755
|
+
...styles2,
|
|
11756
|
+
level: {
|
|
11757
|
+
enumerable: true,
|
|
11758
|
+
get() {
|
|
11759
|
+
return this[GENERATOR].level;
|
|
11760
|
+
},
|
|
11761
|
+
set(level) {
|
|
11762
|
+
this[GENERATOR].level = level;
|
|
11763
|
+
}
|
|
11764
|
+
}
|
|
11765
|
+
});
|
|
11766
|
+
var createStyler = (open, close, parent) => {
|
|
11767
|
+
let openAll;
|
|
11768
|
+
let closeAll;
|
|
11769
|
+
if (parent === undefined) {
|
|
11770
|
+
openAll = open;
|
|
11771
|
+
closeAll = close;
|
|
11772
|
+
} else {
|
|
11773
|
+
openAll = parent.openAll + open;
|
|
11774
|
+
closeAll = close + parent.closeAll;
|
|
11775
|
+
}
|
|
11776
|
+
return {
|
|
11777
|
+
open,
|
|
11778
|
+
close,
|
|
11779
|
+
openAll,
|
|
11780
|
+
closeAll,
|
|
11781
|
+
parent
|
|
11782
|
+
};
|
|
11783
|
+
};
|
|
11784
|
+
var createBuilder = (self, _styler, _isEmpty) => {
|
|
11785
|
+
const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
11786
|
+
Object.setPrototypeOf(builder, proto);
|
|
11787
|
+
builder[GENERATOR] = self;
|
|
11788
|
+
builder[STYLER] = _styler;
|
|
11789
|
+
builder[IS_EMPTY] = _isEmpty;
|
|
11790
|
+
return builder;
|
|
11791
|
+
};
|
|
11792
|
+
var applyStyle = (self, string) => {
|
|
11793
|
+
if (self.level <= 0 || !string) {
|
|
11794
|
+
return self[IS_EMPTY] ? "" : string;
|
|
11795
|
+
}
|
|
11796
|
+
let styler = self[STYLER];
|
|
11797
|
+
if (styler === undefined) {
|
|
11798
|
+
return string;
|
|
11799
|
+
}
|
|
11800
|
+
const { openAll, closeAll } = styler;
|
|
11801
|
+
if (string.includes("\x1B")) {
|
|
11802
|
+
while (styler !== undefined) {
|
|
11803
|
+
string = stringReplaceAll(string, styler.close, styler.open);
|
|
11804
|
+
styler = styler.parent;
|
|
11805
|
+
}
|
|
11806
|
+
}
|
|
11807
|
+
const lfIndex = string.indexOf(`
|
|
11808
|
+
`);
|
|
11809
|
+
if (lfIndex !== -1) {
|
|
11810
|
+
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
11811
|
+
}
|
|
11812
|
+
return openAll + string + closeAll;
|
|
11813
|
+
};
|
|
11814
|
+
Object.defineProperties(createChalk.prototype, styles2);
|
|
11815
|
+
var chalk = createChalk();
|
|
11816
|
+
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
11817
|
+
var source_default = chalk;
|
|
11818
|
+
|
|
11819
|
+
// src/index.ts
|
|
12877
11820
|
class SequentialThinkingServer {
|
|
12878
11821
|
thoughtHistory = [];
|
|
12879
11822
|
branches = {};
|
|
@@ -12912,13 +11855,13 @@ class SequentialThinkingServer {
|
|
|
12912
11855
|
let prefix = "";
|
|
12913
11856
|
let context = "";
|
|
12914
11857
|
if (isRevision) {
|
|
12915
|
-
prefix =
|
|
11858
|
+
prefix = source_default.yellow("\uD83D\uDD04 Revision");
|
|
12916
11859
|
context = ` (revising thought ${revisesThought})`;
|
|
12917
11860
|
} else if (branchFromThought) {
|
|
12918
|
-
prefix =
|
|
11861
|
+
prefix = source_default.green("\uD83C\uDF3F Branch");
|
|
12919
11862
|
context = ` (from thought ${branchFromThought}, ID: ${branchId})`;
|
|
12920
11863
|
} else {
|
|
12921
|
-
prefix =
|
|
11864
|
+
prefix = source_default.blue("\uD83D\uDCAD Thought");
|
|
12922
11865
|
context = "";
|
|
12923
11866
|
}
|
|
12924
11867
|
const header = `${prefix} ${thoughtNumber}/${totalThoughts}${context}`;
|
|
@@ -13082,7 +12025,7 @@ You should:
|
|
|
13082
12025
|
};
|
|
13083
12026
|
var server = new Server({
|
|
13084
12027
|
name: "sequential-thinking-server",
|
|
13085
|
-
version: "0.2.
|
|
12028
|
+
version: "0.2.12"
|
|
13086
12029
|
}, {
|
|
13087
12030
|
capabilities: {
|
|
13088
12031
|
tools: {}
|
|
@@ -13116,5 +12059,5 @@ runServer().catch((error) => {
|
|
|
13116
12059
|
process.exit(1);
|
|
13117
12060
|
});
|
|
13118
12061
|
|
|
13119
|
-
//# debugId=
|
|
12062
|
+
//# debugId=02EF6D47C22C6CDF64756E2164756E21
|
|
13120
12063
|
//# sourceMappingURL=index.js.map
|