@terrazzo/plugin-sass 0.9.0 → 0.9.1

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 CHANGED
@@ -231,28 +231,28 @@ const modes$1 = {};
231
231
  const parsers$1 = [];
232
232
  const colorProfiles$1 = {};
233
233
  const identity$1 = (v) => v;
234
- const useMode$1 = (definition$15$1) => {
235
- converters$1$1[definition$15$1.mode] = {
236
- ...converters$1$1[definition$15$1.mode],
237
- ...definition$15$1.toMode
238
- };
239
- Object.keys(definition$15$1.fromMode || {}).forEach((k$2$1) => {
240
- if (!converters$1$1[k$2$1]) converters$1$1[k$2$1] = {};
241
- converters$1$1[k$2$1][definition$15$1.mode] = definition$15$1.fromMode[k$2$1];
234
+ const useMode$1 = (definition$16$1) => {
235
+ converters$1$1[definition$16$1.mode] = {
236
+ ...converters$1$1[definition$16$1.mode],
237
+ ...definition$16$1.toMode
238
+ };
239
+ Object.keys(definition$16$1.fromMode || {}).forEach((k$3$1) => {
240
+ if (!converters$1$1[k$3$1]) converters$1$1[k$3$1] = {};
241
+ converters$1$1[k$3$1][definition$16$1.mode] = definition$16$1.fromMode[k$3$1];
242
242
  });
243
- if (!definition$15$1.ranges) definition$15$1.ranges = {};
244
- if (!definition$15$1.difference) definition$15$1.difference = {};
245
- definition$15$1.channels.forEach((channel) => {
246
- if (definition$15$1.ranges[channel] === void 0) definition$15$1.ranges[channel] = [0, 1];
247
- if (!definition$15$1.interpolate[channel]) throw new Error(`Missing interpolator for: ${channel}`);
248
- if (typeof definition$15$1.interpolate[channel] === "function") definition$15$1.interpolate[channel] = { use: definition$15$1.interpolate[channel] };
249
- if (!definition$15$1.interpolate[channel].fixup) definition$15$1.interpolate[channel].fixup = identity$1;
243
+ if (!definition$16$1.ranges) definition$16$1.ranges = {};
244
+ if (!definition$16$1.difference) definition$16$1.difference = {};
245
+ definition$16$1.channels.forEach((channel) => {
246
+ if (definition$16$1.ranges[channel] === void 0) definition$16$1.ranges[channel] = [0, 1];
247
+ if (!definition$16$1.interpolate[channel]) throw new Error(`Missing interpolator for: ${channel}`);
248
+ if (typeof definition$16$1.interpolate[channel] === "function") definition$16$1.interpolate[channel] = { use: definition$16$1.interpolate[channel] };
249
+ if (!definition$16$1.interpolate[channel].fixup) definition$16$1.interpolate[channel].fixup = identity$1;
250
250
  });
251
- modes$1[definition$15$1.mode] = definition$15$1;
252
- (definition$15$1.parse || []).forEach((parser) => {
253
- useParser$1(parser, definition$15$1.mode);
251
+ modes$1[definition$16$1.mode] = definition$16$1;
252
+ (definition$16$1.parse || []).forEach((parser) => {
253
+ useParser$1(parser, definition$16$1.mode);
254
254
  });
255
- return converter_default$1(definition$15$1.mode);
255
+ return converter_default$1(definition$16$1.mode);
256
256
  };
257
257
  const getMode$1 = (mode) => modes$1[mode];
258
258
  const useParser$1 = (parser, mode) => {
@@ -567,7 +567,7 @@ const fixupAlpha$1 = (arr) => {
567
567
  });
568
568
  return some_defined ? res : arr;
569
569
  };
570
- const definition$14$1 = {
570
+ const definition$15$1 = {
571
571
  mode: "rgb",
572
572
  channels: [
573
573
  "r",
@@ -605,7 +605,7 @@ const definition$14$1 = {
605
605
  b: 0
606
606
  }
607
607
  };
608
- var definition_default$12$1 = definition$14$1;
608
+ var definition_default$13$1 = definition$15$1;
609
609
  const linearize$2$1 = (v = 0) => Math.pow(Math.abs(v), 563 / 256) * Math.sign(v);
610
610
  const convertA98ToXyz65$1 = (a98) => {
611
611
  let r$1 = linearize$2$1(a98.r);
@@ -636,7 +636,7 @@ const convertXyz65ToA98$1 = ({ x, y, z, alpha }) => {
636
636
  return res;
637
637
  };
638
638
  var convertXyz65ToA98_default$1 = convertXyz65ToA98$1;
639
- const fn$2$1 = (c$1$1 = 0) => {
639
+ const fn$3$1 = (c$1$1 = 0) => {
640
640
  const abs = Math.abs(c$1$1);
641
641
  if (abs <= .04045) return c$1$1 / 12.92;
642
642
  return (Math.sign(c$1$1) || 1) * Math.pow((abs + .055) / 1.055, 2.4);
@@ -644,9 +644,9 @@ const fn$2$1 = (c$1$1 = 0) => {
644
644
  const convertRgbToLrgb$1 = ({ r: r$1, g, b, alpha }) => {
645
645
  let res = {
646
646
  mode: "lrgb",
647
- r: fn$2$1(r$1),
648
- g: fn$2$1(g),
649
- b: fn$2$1(b)
647
+ r: fn$3$1(r$1),
648
+ g: fn$3$1(g),
649
+ b: fn$3$1(b)
650
650
  };
651
651
  if (alpha !== void 0) res.alpha = alpha;
652
652
  return res;
@@ -664,7 +664,7 @@ const convertRgbToXyz65$1 = (rgb$2) => {
664
664
  return res;
665
665
  };
666
666
  var convertRgbToXyz65_default$1 = convertRgbToXyz65$1;
667
- const fn$1$1 = (c$1$1 = 0) => {
667
+ const fn$2$1 = (c$1$1 = 0) => {
668
668
  const abs = Math.abs(c$1$1);
669
669
  if (abs > .0031308) return (Math.sign(c$1$1) || 1) * (1.055 * Math.pow(abs, 1 / 2.4) - .055);
670
670
  return c$1$1 * 12.92;
@@ -672,9 +672,9 @@ const fn$1$1 = (c$1$1 = 0) => {
672
672
  const convertLrgbToRgb$1 = ({ r: r$1, g, b, alpha }, mode = "rgb") => {
673
673
  let res = {
674
674
  mode,
675
- r: fn$1$1(r$1),
676
- g: fn$1$1(g),
677
- b: fn$1$1(b)
675
+ r: fn$2$1(r$1),
676
+ g: fn$2$1(g),
677
+ b: fn$2$1(b)
678
678
  };
679
679
  if (alpha !== void 0) res.alpha = alpha;
680
680
  return res;
@@ -693,8 +693,8 @@ const convertXyz65ToRgb$1 = ({ x, y, z, alpha }) => {
693
693
  return res;
694
694
  };
695
695
  var convertXyz65ToRgb_default$1 = convertXyz65ToRgb$1;
696
- const definition$13$1 = {
697
- ...definition_default$12$1,
696
+ const definition$14$1 = {
697
+ ...definition_default$13$1,
698
698
  mode: "a98",
699
699
  parse: ["a98-rgb"],
700
700
  serialize: "a98-rgb",
@@ -707,7 +707,7 @@ const definition$13$1 = {
707
707
  xyz65: convertA98ToXyz65_default$1
708
708
  }
709
709
  };
710
- var definition_default$15 = definition$13$1;
710
+ var definition_default$16 = definition$14$1;
711
711
  const normalizeHue$1 = (hue$2$1) => (hue$2$1 = hue$2$1 % 360) < 0 ? hue$2$1 + 360 : hue$2$1;
712
712
  var normalizeHue_default$1 = normalizeHue$1;
713
713
  function convertHslToRgb$1({ h, s, l, alpha }) {
@@ -827,12 +827,12 @@ function parseHsl$1(color, parsed) {
827
827
  return res;
828
828
  }
829
829
  var parseHsl_default$1 = parseHsl$1;
830
- const hue$2 = (hues, fn$3$1) => {
830
+ const hue$2 = (hues, fn$4$1) => {
831
831
  return hues.map((hue$2$1, idx, arr) => {
832
832
  if (hue$2$1 === void 0) return hue$2$1;
833
833
  let normalized = normalizeHue_default$1(hue$2$1);
834
834
  if (idx === 0 || hues[idx - 1] === void 0) return normalized;
835
- return fn$3$1(normalized - normalizeHue_default$1(arr[idx - 1]));
835
+ return fn$4$1(normalized - normalizeHue_default$1(arr[idx - 1]));
836
836
  }).reduce((acc, curr) => {
837
837
  if (!acc.length || curr === void 0 || acc[acc.length - 1] === void 0) {
838
838
  acc.push(curr);
@@ -879,7 +879,7 @@ const averageAngle$1 = (val) => {
879
879
  let angle = Math.atan2(sum.sin, sum.cos) * 180 / Math.PI;
880
880
  return angle < 0 ? 360 + angle : angle;
881
881
  };
882
- const definition$12$1 = {
882
+ const definition$13$1 = {
883
883
  mode: "hsl",
884
884
  toMode: { rgb: convertHslToRgb$1 },
885
885
  fromMode: { rgb: convertRgbToHsl$1 },
@@ -908,24 +908,24 @@ const definition$12$1 = {
908
908
  difference: { h: differenceHueSaturation$1 },
909
909
  average: { h: averageAngle$1 }
910
910
  };
911
- var definition_default$1$1 = definition$12$1;
911
+ var definition_default$1$1 = definition$13$1;
912
912
  function convertHsvToRgb$1({ h, s, v, alpha }) {
913
913
  h = normalizeHue_default$1(h !== void 0 ? h : 0);
914
914
  if (s === void 0) s = 0;
915
915
  if (v === void 0) v = 0;
916
- let f$1$1 = Math.abs(h / 60 % 2 - 1);
916
+ let f$2$1 = Math.abs(h / 60 % 2 - 1);
917
917
  let res;
918
918
  switch (Math.floor(h / 60)) {
919
919
  case 0:
920
920
  res = {
921
921
  r: v,
922
- g: v * (1 - s * f$1$1),
922
+ g: v * (1 - s * f$2$1),
923
923
  b: v * (1 - s)
924
924
  };
925
925
  break;
926
926
  case 1:
927
927
  res = {
928
- r: v * (1 - s * f$1$1),
928
+ r: v * (1 - s * f$2$1),
929
929
  g: v,
930
930
  b: v * (1 - s)
931
931
  };
@@ -934,19 +934,19 @@ function convertHsvToRgb$1({ h, s, v, alpha }) {
934
934
  res = {
935
935
  r: v * (1 - s),
936
936
  g: v,
937
- b: v * (1 - s * f$1$1)
937
+ b: v * (1 - s * f$2$1)
938
938
  };
939
939
  break;
940
940
  case 3:
941
941
  res = {
942
942
  r: v * (1 - s),
943
- g: v * (1 - s * f$1$1),
943
+ g: v * (1 - s * f$2$1),
944
944
  b: v
945
945
  };
946
946
  break;
947
947
  case 4:
948
948
  res = {
949
- r: v * (1 - s * f$1$1),
949
+ r: v * (1 - s * f$2$1),
950
950
  g: v * (1 - s),
951
951
  b: v
952
952
  };
@@ -955,7 +955,7 @@ function convertHsvToRgb$1({ h, s, v, alpha }) {
955
955
  res = {
956
956
  r: v,
957
957
  g: v * (1 - s),
958
- b: v * (1 - s * f$1$1)
958
+ b: v * (1 - s * f$2$1)
959
959
  };
960
960
  break;
961
961
  default: res = {
@@ -982,7 +982,7 @@ function convertRgbToHsv$1({ r: r$1, g, b, alpha }) {
982
982
  if (alpha !== void 0) res.alpha = alpha;
983
983
  return res;
984
984
  }
985
- const definition$11$1 = {
985
+ const definition$12$1 = {
986
986
  mode: "hsv",
987
987
  toMode: { rgb: convertHsvToRgb$1 },
988
988
  parse: ["--hsv"],
@@ -1011,7 +1011,7 @@ const definition$11$1 = {
1011
1011
  difference: { h: differenceHueSaturation$1 },
1012
1012
  average: { h: averageAngle$1 }
1013
1013
  };
1014
- var definition_default$2$1 = definition$11$1;
1014
+ var definition_default$2$1 = definition$12$1;
1015
1015
  function convertHwbToRgb$1({ h, w, b, alpha }) {
1016
1016
  if (w === void 0) w = 0;
1017
1017
  if (b === void 0) b = 0;
@@ -1061,7 +1061,7 @@ function ParseHwb$1(color, parsed) {
1061
1061
  return res;
1062
1062
  }
1063
1063
  var parseHwb_default$1 = ParseHwb$1;
1064
- const definition$10$1 = {
1064
+ const definition$11$1 = {
1065
1065
  mode: "hwb",
1066
1066
  toMode: { rgb: convertHwbToRgb$1 },
1067
1067
  fromMode: { rgb: convertRgbToHwb$1 },
@@ -1090,9 +1090,9 @@ const definition$10$1 = {
1090
1090
  difference: { h: differenceHueNaive$1 },
1091
1091
  average: { h: averageAngle$1 }
1092
1092
  };
1093
- var definition_default$3$1 = definition$10$1;
1094
- const k$2 = Math.pow(29, 3) / Math.pow(3, 3);
1095
- const e$2 = Math.pow(6, 3) / Math.pow(29, 3);
1093
+ var definition_default$3$1 = definition$11$1;
1094
+ const k$1$1 = Math.pow(29, 3) / Math.pow(3, 3);
1095
+ const e$1$1 = Math.pow(6, 3) / Math.pow(29, 3);
1096
1096
  const D50$1 = {
1097
1097
  X: .3457 / .3585,
1098
1098
  Y: 1,
@@ -1103,9 +1103,9 @@ const D65$1 = {
1103
1103
  Y: 1,
1104
1104
  Z: .3583 / .329
1105
1105
  };
1106
- const k$1$1 = Math.pow(29, 3) / Math.pow(3, 3);
1107
- const e$1$1 = Math.pow(6, 3) / Math.pow(29, 3);
1108
- let fn$3 = (v) => Math.pow(v, 3) > e$2 ? Math.pow(v, 3) : (116 * v - 16) / k$2;
1106
+ const k$2$1 = Math.pow(29, 3) / Math.pow(3, 3);
1107
+ const e$2$1 = Math.pow(6, 3) / Math.pow(29, 3);
1108
+ let fn$1$1 = (v) => Math.pow(v, 3) > e$1$1 ? Math.pow(v, 3) : (116 * v - 16) / k$1$1;
1109
1109
  const convertLabToXyz50$1 = ({ l, a, b, alpha }) => {
1110
1110
  if (l === void 0) l = 0;
1111
1111
  if (a === void 0) a = 0;
@@ -1115,9 +1115,9 @@ const convertLabToXyz50$1 = ({ l, a, b, alpha }) => {
1115
1115
  let fz = fy - b / 200;
1116
1116
  let res = {
1117
1117
  mode: "xyz50",
1118
- x: fn$3(fx) * D50$1.X,
1119
- y: fn$3(fy) * D50$1.Y,
1120
- z: fn$3(fz) * D50$1.Z
1118
+ x: fn$1$1(fx) * D50$1.X,
1119
+ y: fn$1$1(fy) * D50$1.Y,
1120
+ z: fn$1$1(fz) * D50$1.Z
1121
1121
  };
1122
1122
  if (alpha !== void 0) res.alpha = alpha;
1123
1123
  return res;
@@ -1150,14 +1150,14 @@ const convertRgbToXyz50$1 = (rgb$2) => {
1150
1150
  return res;
1151
1151
  };
1152
1152
  var convertRgbToXyz50_default$1 = convertRgbToXyz50$1;
1153
- const f$1 = (value) => value > e$2 ? Math.cbrt(value) : (k$2 * value + 16) / 116;
1153
+ const f$1$1 = (value) => value > e$1$1 ? Math.cbrt(value) : (k$1$1 * value + 16) / 116;
1154
1154
  const convertXyz50ToLab$1 = ({ x, y, z, alpha }) => {
1155
1155
  if (x === void 0) x = 0;
1156
1156
  if (y === void 0) y = 0;
1157
1157
  if (z === void 0) z = 0;
1158
- let f0 = f$1(x / D50$1.X);
1159
- let f1 = f$1(y / D50$1.Y);
1160
- let f2 = f$1(z / D50$1.Z);
1158
+ let f0 = f$1$1(x / D50$1.X);
1159
+ let f1 = f$1$1(y / D50$1.Y);
1160
+ let f2 = f$1$1(z / D50$1.Z);
1161
1161
  let res = {
1162
1162
  mode: "lab",
1163
1163
  l: 116 * f1 - 16,
@@ -1186,7 +1186,7 @@ function parseLab$1(color, parsed) {
1186
1186
  return res;
1187
1187
  }
1188
1188
  var parseLab_default$1 = parseLab$1;
1189
- const definition$9$1 = {
1189
+ const definition$10$1 = {
1190
1190
  mode: "lab",
1191
1191
  toMode: {
1192
1192
  xyz50: convertLabToXyz50_default$1,
@@ -1219,7 +1219,73 @@ const definition$9$1 = {
1219
1219
  }
1220
1220
  }
1221
1221
  };
1222
- var definition_default$4$1 = definition$9$1;
1222
+ var definition_default$4$1 = definition$10$1;
1223
+ const k$3 = Math.pow(29, 3) / Math.pow(3, 3);
1224
+ const e$3 = Math.pow(6, 3) / Math.pow(29, 3);
1225
+ let fn$4 = (v) => Math.pow(v, 3) > e$3 ? Math.pow(v, 3) : (116 * v - 16) / k$3;
1226
+ const convertLab65ToXyz65$1 = ({ l, a, b, alpha }) => {
1227
+ if (l === void 0) l = 0;
1228
+ if (a === void 0) a = 0;
1229
+ if (b === void 0) b = 0;
1230
+ let fy = (l + 16) / 116;
1231
+ let fx = a / 500 + fy;
1232
+ let fz = fy - b / 200;
1233
+ let res = {
1234
+ mode: "xyz65",
1235
+ x: fn$4(fx) * D65$1.X,
1236
+ y: fn$4(fy) * D65$1.Y,
1237
+ z: fn$4(fz) * D65$1.Z
1238
+ };
1239
+ if (alpha !== void 0) res.alpha = alpha;
1240
+ return res;
1241
+ };
1242
+ var convertLab65ToXyz65_default$1 = convertLab65ToXyz65$1;
1243
+ const convertLab65ToRgb$1 = (lab) => convertXyz65ToRgb_default$1(convertLab65ToXyz65_default$1(lab));
1244
+ var convertLab65ToRgb_default$1 = convertLab65ToRgb$1;
1245
+ const f$2 = (value) => value > e$3 ? Math.cbrt(value) : (k$3 * value + 16) / 116;
1246
+ const convertXyz65ToLab65$1 = ({ x, y, z, alpha }) => {
1247
+ if (x === void 0) x = 0;
1248
+ if (y === void 0) y = 0;
1249
+ if (z === void 0) z = 0;
1250
+ let f0 = f$2(x / D65$1.X);
1251
+ let f1 = f$2(y / D65$1.Y);
1252
+ let f2 = f$2(z / D65$1.Z);
1253
+ let res = {
1254
+ mode: "lab65",
1255
+ l: 116 * f1 - 16,
1256
+ a: 500 * (f0 - f1),
1257
+ b: 200 * (f1 - f2)
1258
+ };
1259
+ if (alpha !== void 0) res.alpha = alpha;
1260
+ return res;
1261
+ };
1262
+ var convertXyz65ToLab65_default$1 = convertXyz65ToLab65$1;
1263
+ const convertRgbToLab65$1 = (rgb$2) => {
1264
+ let res = convertXyz65ToLab65_default$1(convertRgbToXyz65_default$1(rgb$2));
1265
+ if (rgb$2.r === rgb$2.b && rgb$2.b === rgb$2.g) res.a = res.b = 0;
1266
+ return res;
1267
+ };
1268
+ var convertRgbToLab65_default$1 = convertRgbToLab65$1;
1269
+ const definition$9$1 = {
1270
+ ...definition_default$4$1,
1271
+ mode: "lab65",
1272
+ parse: ["--lab-d65"],
1273
+ serialize: "--lab-d65",
1274
+ toMode: {
1275
+ xyz65: convertLab65ToXyz65_default$1,
1276
+ rgb: convertLab65ToRgb_default$1
1277
+ },
1278
+ fromMode: {
1279
+ xyz65: convertXyz65ToLab65_default$1,
1280
+ rgb: convertRgbToLab65_default$1
1281
+ },
1282
+ ranges: {
1283
+ l: [0, 100],
1284
+ a: [-86.182, 98.234],
1285
+ b: [-107.86, 94.477]
1286
+ }
1287
+ };
1288
+ var definition_default$5$1 = definition$9$1;
1223
1289
  const convertLabToLch$1 = ({ l, a, b, alpha }, mode = "lch") => {
1224
1290
  if (a === void 0) a = 0;
1225
1291
  if (b === void 0) b = 0;
@@ -1301,16 +1367,16 @@ const definition$8$1 = {
1301
1367
  difference: { h: differenceHueChroma$1 },
1302
1368
  average: { h: averageAngle$1 }
1303
1369
  };
1304
- var definition_default$5$1 = definition$8$1;
1370
+ var definition_default$6$1 = definition$8$1;
1305
1371
  const definition$7$1 = {
1306
- ...definition_default$12$1,
1372
+ ...definition_default$13$1,
1307
1373
  mode: "lrgb",
1308
1374
  toMode: { rgb: convertLrgbToRgb_default$1 },
1309
1375
  fromMode: { rgb: convertRgbToLrgb_default$1 },
1310
1376
  parse: ["srgb-linear"],
1311
1377
  serialize: "srgb-linear"
1312
1378
  };
1313
- var definition_default$6$1 = definition$7$1;
1379
+ var definition_default$7$1 = definition$7$1;
1314
1380
  const convertOklabToLrgb$1 = ({ l, a, b, alpha }) => {
1315
1381
  if (l === void 0) l = 0;
1316
1382
  if (a === void 0) a = 0;
@@ -1384,7 +1450,7 @@ const definition$6$1 = {
1384
1450
  parse: [parseOklab_default$1],
1385
1451
  serialize: (c$1$1) => `oklab(${c$1$1.l !== void 0 ? c$1$1.l : "none"} ${c$1$1.a !== void 0 ? c$1$1.a : "none"} ${c$1$1.b !== void 0 ? c$1$1.b : "none"}${c$1$1.alpha < 1 ? ` / ${c$1$1.alpha}` : ""})`
1386
1452
  };
1387
- var definition_default$7$1 = definition$6$1;
1453
+ var definition_default$8$1 = definition$6$1;
1388
1454
  function parseOklch$1(color, parsed) {
1389
1455
  if (!parsed || parsed[0] !== "oklch") return void 0;
1390
1456
  const res = { mode: "oklch" };
@@ -1403,7 +1469,7 @@ function parseOklch$1(color, parsed) {
1403
1469
  }
1404
1470
  var parseOklch_default$1 = parseOklch$1;
1405
1471
  const definition$5$1 = {
1406
- ...definition_default$5$1,
1472
+ ...definition_default$6$1,
1407
1473
  mode: "oklch",
1408
1474
  toMode: {
1409
1475
  oklab: (c$1$1) => convertLchToLab_default$1(c$1$1, "oklab"),
@@ -1421,7 +1487,7 @@ const definition$5$1 = {
1421
1487
  h: [0, 360]
1422
1488
  }
1423
1489
  };
1424
- var definition_default$8$1 = definition$5$1;
1490
+ var definition_default$9$1 = definition$5$1;
1425
1491
  const convertP3ToXyz65$1 = (rgb$2) => {
1426
1492
  let { r: r$1, g, b, alpha } = convertRgbToLrgb_default$1(rgb$2);
1427
1493
  let res = {
@@ -1448,7 +1514,7 @@ const convertXyz65ToP3$1 = ({ x, y, z, alpha }) => {
1448
1514
  };
1449
1515
  var convertXyz65ToP3_default$1 = convertXyz65ToP3$1;
1450
1516
  const definition$4$1 = {
1451
- ...definition_default$12$1,
1517
+ ...definition_default$13$1,
1452
1518
  mode: "p3",
1453
1519
  parse: ["display-p3"],
1454
1520
  serialize: "display-p3",
@@ -1461,7 +1527,7 @@ const definition$4$1 = {
1461
1527
  xyz65: convertP3ToXyz65_default$1
1462
1528
  }
1463
1529
  };
1464
- var definition_default$9$1 = definition$4$1;
1530
+ var definition_default$10$1 = definition$4$1;
1465
1531
  const gamma$1$1 = (v) => {
1466
1532
  let abs = Math.abs(v);
1467
1533
  if (abs >= 1 / 512) return Math.sign(v) * Math.pow(abs, 1 / 1.8);
@@ -1501,7 +1567,7 @@ const convertProphotoToXyz50$1 = (prophoto) => {
1501
1567
  };
1502
1568
  var convertProphotoToXyz50_default$1 = convertProphotoToXyz50$1;
1503
1569
  const definition$3$1 = {
1504
- ...definition_default$12$1,
1570
+ ...definition_default$13$1,
1505
1571
  mode: "prophoto",
1506
1572
  parse: ["prophoto-rgb"],
1507
1573
  serialize: "prophoto-rgb",
@@ -1514,7 +1580,7 @@ const definition$3$1 = {
1514
1580
  rgb: (color) => convertXyz50ToRgb_default$1(convertProphotoToXyz50_default$1(color))
1515
1581
  }
1516
1582
  };
1517
- var definition_default$10$1 = definition$3$1;
1583
+ var definition_default$11$1 = definition$3$1;
1518
1584
  const α$1$1 = 1.09929682680944;
1519
1585
  const β$1$1 = .018053968510807;
1520
1586
  const gamma$3 = (v) => {
@@ -1558,7 +1624,7 @@ const convertRec2020ToXyz65$1 = (rec2020) => {
1558
1624
  };
1559
1625
  var convertRec2020ToXyz65_default$1 = convertRec2020ToXyz65$1;
1560
1626
  const definition$2$1 = {
1561
- ...definition_default$12$1,
1627
+ ...definition_default$13$1,
1562
1628
  mode: "rec2020",
1563
1629
  fromMode: {
1564
1630
  xyz65: convertXyz65ToRec2020_default$1,
@@ -1571,7 +1637,7 @@ const definition$2$1 = {
1571
1637
  parse: ["rec2020"],
1572
1638
  serialize: "rec2020"
1573
1639
  };
1574
- var definition_default$11$1 = definition$2$1;
1640
+ var definition_default$12$1 = definition$2$1;
1575
1641
  const definition$1$1 = {
1576
1642
  mode: "xyz50",
1577
1643
  parse: ["xyz-d50"],
@@ -1605,7 +1671,7 @@ const definition$1$1 = {
1605
1671
  }
1606
1672
  }
1607
1673
  };
1608
- var definition_default$13$1 = definition$1$1;
1674
+ var definition_default$14$1 = definition$1$1;
1609
1675
  const convertXyz65ToXyz50$1 = (xyz65) => {
1610
1676
  let { x, y, z, alpha } = xyz65;
1611
1677
  if (x === void 0) x = 0;
@@ -1636,7 +1702,7 @@ const convertXyz50ToXyz65$1 = (xyz50) => {
1636
1702
  return res;
1637
1703
  };
1638
1704
  var convertXyz50ToXyz65_default$1 = convertXyz50ToXyz65$1;
1639
- const definition$15 = {
1705
+ const definition$16 = {
1640
1706
  mode: "xyz65",
1641
1707
  toMode: {
1642
1708
  rgb: convertXyz65ToRgb_default$1,
@@ -1669,7 +1735,7 @@ const definition$15 = {
1669
1735
  }
1670
1736
  }
1671
1737
  };
1672
- var definition_default$14$1 = definition$15;
1738
+ var definition_default$15$1 = definition$16;
1673
1739
  const r = (value, precision) => Math.round(value * (precision = Math.pow(10, precision))) / precision;
1674
1740
  const round = (precision = 4) => (value) => typeof value === "number" ? r(value, precision) : value;
1675
1741
  var round_default = round;
@@ -1678,21 +1744,22 @@ const rgb$1 = converter_default$1("rgb");
1678
1744
  const hsl = converter_default$1("hsl");
1679
1745
  const rgb = converter_default$1("rgb");
1680
1746
  const converters$2 = {
1681
- a98: useMode$1(definition_default$15),
1747
+ a98: useMode$1(definition_default$16),
1682
1748
  hsl: useMode$1(definition_default$1$1),
1683
1749
  hsv: useMode$1(definition_default$2$1),
1684
1750
  hwb: useMode$1(definition_default$3$1),
1685
1751
  lab: useMode$1(definition_default$4$1),
1686
- lch: useMode$1(definition_default$5$1),
1687
- lrgb: useMode$1(definition_default$6$1),
1688
- oklab: useMode$1(definition_default$7$1),
1689
- oklch: useMode$1(definition_default$8$1),
1690
- p3: useMode$1(definition_default$9$1),
1691
- prophoto: useMode$1(definition_default$10$1),
1692
- rec2020: useMode$1(definition_default$11$1),
1693
- rgb: useMode$1(definition_default$12$1),
1694
- xyz50: useMode$1(definition_default$13$1),
1695
- xyz65: useMode$1(definition_default$14$1)
1752
+ lab65: useMode$1(definition_default$5$1),
1753
+ lch: useMode$1(definition_default$6$1),
1754
+ lrgb: useMode$1(definition_default$7$1),
1755
+ oklab: useMode$1(definition_default$8$1),
1756
+ oklch: useMode$1(definition_default$9$1),
1757
+ p3: useMode$1(definition_default$10$1),
1758
+ prophoto: useMode$1(definition_default$11$1),
1759
+ rec2020: useMode$1(definition_default$12$1),
1760
+ rgb: useMode$1(definition_default$13$1),
1761
+ xyz50: useMode$1(definition_default$14$1),
1762
+ xyz65: useMode$1(definition_default$15$1)
1696
1763
  };
1697
1764
  const FORMAT_ID = "css";
1698
1765
 
@@ -1954,28 +2021,28 @@ const modes = {};
1954
2021
  const parsers = [];
1955
2022
  const colorProfiles = {};
1956
2023
  const identity = (v) => v;
1957
- const useMode = (definition$16) => {
1958
- converters$1[definition$16.mode] = {
1959
- ...converters$1[definition$16.mode],
1960
- ...definition$16.toMode
1961
- };
1962
- Object.keys(definition$16.fromMode || {}).forEach((k$3) => {
1963
- if (!converters$1[k$3]) converters$1[k$3] = {};
1964
- converters$1[k$3][definition$16.mode] = definition$16.fromMode[k$3];
2024
+ const useMode = (definition$17) => {
2025
+ converters$1[definition$17.mode] = {
2026
+ ...converters$1[definition$17.mode],
2027
+ ...definition$17.toMode
2028
+ };
2029
+ Object.keys(definition$17.fromMode || {}).forEach((k$4) => {
2030
+ if (!converters$1[k$4]) converters$1[k$4] = {};
2031
+ converters$1[k$4][definition$17.mode] = definition$17.fromMode[k$4];
1965
2032
  });
1966
- if (!definition$16.ranges) definition$16.ranges = {};
1967
- if (!definition$16.difference) definition$16.difference = {};
1968
- definition$16.channels.forEach((channel) => {
1969
- if (definition$16.ranges[channel] === void 0) definition$16.ranges[channel] = [0, 1];
1970
- if (!definition$16.interpolate[channel]) throw new Error(`Missing interpolator for: ${channel}`);
1971
- if (typeof definition$16.interpolate[channel] === "function") definition$16.interpolate[channel] = { use: definition$16.interpolate[channel] };
1972
- if (!definition$16.interpolate[channel].fixup) definition$16.interpolate[channel].fixup = identity;
2033
+ if (!definition$17.ranges) definition$17.ranges = {};
2034
+ if (!definition$17.difference) definition$17.difference = {};
2035
+ definition$17.channels.forEach((channel) => {
2036
+ if (definition$17.ranges[channel] === void 0) definition$17.ranges[channel] = [0, 1];
2037
+ if (!definition$17.interpolate[channel]) throw new Error(`Missing interpolator for: ${channel}`);
2038
+ if (typeof definition$17.interpolate[channel] === "function") definition$17.interpolate[channel] = { use: definition$17.interpolate[channel] };
2039
+ if (!definition$17.interpolate[channel].fixup) definition$17.interpolate[channel].fixup = identity;
1973
2040
  });
1974
- modes[definition$16.mode] = definition$16;
1975
- (definition$16.parse || []).forEach((parser) => {
1976
- useParser(parser, definition$16.mode);
2041
+ modes[definition$17.mode] = definition$17;
2042
+ (definition$17.parse || []).forEach((parser) => {
2043
+ useParser(parser, definition$17.mode);
1977
2044
  });
1978
- return converter_default(definition$16.mode);
2045
+ return converter_default(definition$17.mode);
1979
2046
  };
1980
2047
  const getMode = (mode) => modes[mode];
1981
2048
  const useParser = (parser, mode) => {
@@ -2314,7 +2381,7 @@ const fixupAlpha = (arr) => {
2314
2381
 
2315
2382
  //#endregion
2316
2383
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/rgb/definition.js
2317
- const definition$14 = {
2384
+ const definition$15 = {
2318
2385
  mode: "rgb",
2319
2386
  channels: [
2320
2387
  "r",
@@ -2352,7 +2419,7 @@ const definition$14 = {
2352
2419
  b: 0
2353
2420
  }
2354
2421
  };
2355
- var definition_default$12 = definition$14;
2422
+ var definition_default$13 = definition$15;
2356
2423
 
2357
2424
  //#endregion
2358
2425
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/a98/convertA98ToXyz65.js
@@ -2392,7 +2459,7 @@ var convertXyz65ToA98_default = convertXyz65ToA98;
2392
2459
 
2393
2460
  //#endregion
2394
2461
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/lrgb/convertRgbToLrgb.js
2395
- const fn$2 = (c$2 = 0) => {
2462
+ const fn$3 = (c$2 = 0) => {
2396
2463
  const abs = Math.abs(c$2);
2397
2464
  if (abs <= .04045) return c$2 / 12.92;
2398
2465
  return (Math.sign(c$2) || 1) * Math.pow((abs + .055) / 1.055, 2.4);
@@ -2400,9 +2467,9 @@ const fn$2 = (c$2 = 0) => {
2400
2467
  const convertRgbToLrgb = ({ r: r$1, g, b, alpha }) => {
2401
2468
  let res = {
2402
2469
  mode: "lrgb",
2403
- r: fn$2(r$1),
2404
- g: fn$2(g),
2405
- b: fn$2(b)
2470
+ r: fn$3(r$1),
2471
+ g: fn$3(g),
2472
+ b: fn$3(b)
2406
2473
  };
2407
2474
  if (alpha !== void 0) res.alpha = alpha;
2408
2475
  return res;
@@ -2426,7 +2493,7 @@ var convertRgbToXyz65_default = convertRgbToXyz65;
2426
2493
 
2427
2494
  //#endregion
2428
2495
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/lrgb/convertLrgbToRgb.js
2429
- const fn$1 = (c$2 = 0) => {
2496
+ const fn$2 = (c$2 = 0) => {
2430
2497
  const abs = Math.abs(c$2);
2431
2498
  if (abs > .0031308) return (Math.sign(c$2) || 1) * (1.055 * Math.pow(abs, 1 / 2.4) - .055);
2432
2499
  return c$2 * 12.92;
@@ -2434,9 +2501,9 @@ const fn$1 = (c$2 = 0) => {
2434
2501
  const convertLrgbToRgb = ({ r: r$1, g, b, alpha }, mode = "rgb") => {
2435
2502
  let res = {
2436
2503
  mode,
2437
- r: fn$1(r$1),
2438
- g: fn$1(g),
2439
- b: fn$1(b)
2504
+ r: fn$2(r$1),
2505
+ g: fn$2(g),
2506
+ b: fn$2(b)
2440
2507
  };
2441
2508
  if (alpha !== void 0) res.alpha = alpha;
2442
2509
  return res;
@@ -2461,8 +2528,8 @@ var convertXyz65ToRgb_default = convertXyz65ToRgb;
2461
2528
 
2462
2529
  //#endregion
2463
2530
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/a98/definition.js
2464
- const definition$13 = {
2465
- ...definition_default$12,
2531
+ const definition$14 = {
2532
+ ...definition_default$13,
2466
2533
  mode: "a98",
2467
2534
  parse: ["a98-rgb"],
2468
2535
  serialize: "a98-rgb",
@@ -2475,7 +2542,7 @@ const definition$13 = {
2475
2542
  xyz65: convertA98ToXyz65_default
2476
2543
  }
2477
2544
  };
2478
- var definition_default = definition$13;
2545
+ var definition_default = definition$14;
2479
2546
 
2480
2547
  //#endregion
2481
2548
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/util/normalizeHue.js
@@ -2616,12 +2683,12 @@ var parseHsl_default = parseHsl;
2616
2683
 
2617
2684
  //#endregion
2618
2685
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/fixup/hue.js
2619
- const hue = (hues, fn$4) => {
2686
+ const hue = (hues, fn$5) => {
2620
2687
  return hues.map((hue$3, idx, arr) => {
2621
2688
  if (hue$3 === void 0) return hue$3;
2622
2689
  let normalized = normalizeHue_default(hue$3);
2623
2690
  if (idx === 0 || hues[idx - 1] === void 0) return normalized;
2624
- return fn$4(normalized - normalizeHue_default(arr[idx - 1]));
2691
+ return fn$5(normalized - normalizeHue_default(arr[idx - 1]));
2625
2692
  }).reduce((acc, curr) => {
2626
2693
  if (!acc.length || curr === void 0 || acc[acc.length - 1] === void 0) {
2627
2694
  acc.push(curr);
@@ -2677,7 +2744,7 @@ const averageAngle = (val) => {
2677
2744
 
2678
2745
  //#endregion
2679
2746
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/hsl/definition.js
2680
- const definition$12 = {
2747
+ const definition$13 = {
2681
2748
  mode: "hsl",
2682
2749
  toMode: { rgb: convertHslToRgb },
2683
2750
  fromMode: { rgb: convertRgbToHsl },
@@ -2706,7 +2773,7 @@ const definition$12 = {
2706
2773
  difference: { h: differenceHueSaturation },
2707
2774
  average: { h: averageAngle }
2708
2775
  };
2709
- var definition_default$1 = definition$12;
2776
+ var definition_default$1 = definition$13;
2710
2777
 
2711
2778
  //#endregion
2712
2779
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/hsv/convertHsvToRgb.js
@@ -2714,19 +2781,19 @@ function convertHsvToRgb({ h, s, v, alpha }) {
2714
2781
  h = normalizeHue_default(h !== void 0 ? h : 0);
2715
2782
  if (s === void 0) s = 0;
2716
2783
  if (v === void 0) v = 0;
2717
- let f$2 = Math.abs(h / 60 % 2 - 1);
2784
+ let f$3 = Math.abs(h / 60 % 2 - 1);
2718
2785
  let res;
2719
2786
  switch (Math.floor(h / 60)) {
2720
2787
  case 0:
2721
2788
  res = {
2722
2789
  r: v,
2723
- g: v * (1 - s * f$2),
2790
+ g: v * (1 - s * f$3),
2724
2791
  b: v * (1 - s)
2725
2792
  };
2726
2793
  break;
2727
2794
  case 1:
2728
2795
  res = {
2729
- r: v * (1 - s * f$2),
2796
+ r: v * (1 - s * f$3),
2730
2797
  g: v,
2731
2798
  b: v * (1 - s)
2732
2799
  };
@@ -2735,19 +2802,19 @@ function convertHsvToRgb({ h, s, v, alpha }) {
2735
2802
  res = {
2736
2803
  r: v * (1 - s),
2737
2804
  g: v,
2738
- b: v * (1 - s * f$2)
2805
+ b: v * (1 - s * f$3)
2739
2806
  };
2740
2807
  break;
2741
2808
  case 3:
2742
2809
  res = {
2743
2810
  r: v * (1 - s),
2744
- g: v * (1 - s * f$2),
2811
+ g: v * (1 - s * f$3),
2745
2812
  b: v
2746
2813
  };
2747
2814
  break;
2748
2815
  case 4:
2749
2816
  res = {
2750
- r: v * (1 - s * f$2),
2817
+ r: v * (1 - s * f$3),
2751
2818
  g: v * (1 - s),
2752
2819
  b: v
2753
2820
  };
@@ -2756,7 +2823,7 @@ function convertHsvToRgb({ h, s, v, alpha }) {
2756
2823
  res = {
2757
2824
  r: v,
2758
2825
  g: v * (1 - s),
2759
- b: v * (1 - s * f$2)
2826
+ b: v * (1 - s * f$3)
2760
2827
  };
2761
2828
  break;
2762
2829
  default: res = {
@@ -2789,7 +2856,7 @@ function convertRgbToHsv({ r: r$1, g, b, alpha }) {
2789
2856
 
2790
2857
  //#endregion
2791
2858
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/hsv/definition.js
2792
- const definition$11 = {
2859
+ const definition$12 = {
2793
2860
  mode: "hsv",
2794
2861
  toMode: { rgb: convertHsvToRgb },
2795
2862
  parse: ["--hsv"],
@@ -2818,7 +2885,7 @@ const definition$11 = {
2818
2885
  difference: { h: differenceHueSaturation },
2819
2886
  average: { h: averageAngle }
2820
2887
  };
2821
- var definition_default$2 = definition$11;
2888
+ var definition_default$2 = definition$12;
2822
2889
 
2823
2890
  //#endregion
2824
2891
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/hwb/convertHwbToRgb.js
@@ -2880,7 +2947,7 @@ var parseHwb_default = ParseHwb;
2880
2947
 
2881
2948
  //#endregion
2882
2949
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/hwb/definition.js
2883
- const definition$10 = {
2950
+ const definition$11 = {
2884
2951
  mode: "hwb",
2885
2952
  toMode: { rgb: convertHwbToRgb },
2886
2953
  fromMode: { rgb: convertRgbToHwb },
@@ -2909,12 +2976,12 @@ const definition$10 = {
2909
2976
  difference: { h: differenceHueNaive },
2910
2977
  average: { h: averageAngle }
2911
2978
  };
2912
- var definition_default$3 = definition$10;
2979
+ var definition_default$3 = definition$11;
2913
2980
 
2914
2981
  //#endregion
2915
2982
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/xyz50/constants.js
2916
- const k = Math.pow(29, 3) / Math.pow(3, 3);
2917
- const e = Math.pow(6, 3) / Math.pow(29, 3);
2983
+ const k$1 = Math.pow(29, 3) / Math.pow(3, 3);
2984
+ const e$1 = Math.pow(6, 3) / Math.pow(29, 3);
2918
2985
 
2919
2986
  //#endregion
2920
2987
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/constants.js
@@ -2928,12 +2995,12 @@ const D65 = {
2928
2995
  Y: 1,
2929
2996
  Z: .3583 / .329
2930
2997
  };
2931
- const k$1 = Math.pow(29, 3) / Math.pow(3, 3);
2932
- const e$1 = Math.pow(6, 3) / Math.pow(29, 3);
2998
+ const k$2 = Math.pow(29, 3) / Math.pow(3, 3);
2999
+ const e$2 = Math.pow(6, 3) / Math.pow(29, 3);
2933
3000
 
2934
3001
  //#endregion
2935
3002
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/lab/convertLabToXyz50.js
2936
- let fn = (v) => Math.pow(v, 3) > e ? Math.pow(v, 3) : (116 * v - 16) / k;
3003
+ let fn$1 = (v) => Math.pow(v, 3) > e$1 ? Math.pow(v, 3) : (116 * v - 16) / k$1;
2937
3004
  const convertLabToXyz50 = ({ l, a, b, alpha }) => {
2938
3005
  if (l === void 0) l = 0;
2939
3006
  if (a === void 0) a = 0;
@@ -2943,9 +3010,9 @@ const convertLabToXyz50 = ({ l, a, b, alpha }) => {
2943
3010
  let fz = fy - b / 200;
2944
3011
  let res = {
2945
3012
  mode: "xyz50",
2946
- x: fn(fx) * D50.X,
2947
- y: fn(fy) * D50.Y,
2948
- z: fn(fz) * D50.Z
3013
+ x: fn$1(fx) * D50.X,
3014
+ y: fn$1(fy) * D50.Y,
3015
+ z: fn$1(fz) * D50.Z
2949
3016
  };
2950
3017
  if (alpha !== void 0) res.alpha = alpha;
2951
3018
  return res;
@@ -2990,14 +3057,14 @@ var convertRgbToXyz50_default = convertRgbToXyz50;
2990
3057
 
2991
3058
  //#endregion
2992
3059
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/lab/convertXyz50ToLab.js
2993
- const f = (value) => value > e ? Math.cbrt(value) : (k * value + 16) / 116;
3060
+ const f$1 = (value) => value > e$1 ? Math.cbrt(value) : (k$1 * value + 16) / 116;
2994
3061
  const convertXyz50ToLab = ({ x, y, z, alpha }) => {
2995
3062
  if (x === void 0) x = 0;
2996
3063
  if (y === void 0) y = 0;
2997
3064
  if (z === void 0) z = 0;
2998
- let f0 = f(x / D50.X);
2999
- let f1 = f(y / D50.Y);
3000
- let f2 = f(z / D50.Z);
3065
+ let f0 = f$1(x / D50.X);
3066
+ let f1 = f$1(y / D50.Y);
3067
+ let f2 = f$1(z / D50.Z);
3001
3068
  let res = {
3002
3069
  mode: "lab",
3003
3070
  l: 116 * f1 - 16,
@@ -3035,7 +3102,7 @@ var parseLab_default = parseLab;
3035
3102
 
3036
3103
  //#endregion
3037
3104
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/lab/definition.js
3038
- const definition$9 = {
3105
+ const definition$10 = {
3039
3106
  mode: "lab",
3040
3107
  toMode: {
3041
3108
  xyz50: convertLabToXyz50_default,
@@ -3068,7 +3135,91 @@ const definition$9 = {
3068
3135
  }
3069
3136
  }
3070
3137
  };
3071
- var definition_default$4 = definition$9;
3138
+ var definition_default$4 = definition$10;
3139
+
3140
+ //#endregion
3141
+ //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/xyz65/constants.js
3142
+ const k = Math.pow(29, 3) / Math.pow(3, 3);
3143
+ const e = Math.pow(6, 3) / Math.pow(29, 3);
3144
+
3145
+ //#endregion
3146
+ //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/lab65/convertLab65ToXyz65.js
3147
+ let fn = (v) => Math.pow(v, 3) > e ? Math.pow(v, 3) : (116 * v - 16) / k;
3148
+ const convertLab65ToXyz65 = ({ l, a, b, alpha }) => {
3149
+ if (l === void 0) l = 0;
3150
+ if (a === void 0) a = 0;
3151
+ if (b === void 0) b = 0;
3152
+ let fy = (l + 16) / 116;
3153
+ let fx = a / 500 + fy;
3154
+ let fz = fy - b / 200;
3155
+ let res = {
3156
+ mode: "xyz65",
3157
+ x: fn(fx) * D65.X,
3158
+ y: fn(fy) * D65.Y,
3159
+ z: fn(fz) * D65.Z
3160
+ };
3161
+ if (alpha !== void 0) res.alpha = alpha;
3162
+ return res;
3163
+ };
3164
+ var convertLab65ToXyz65_default = convertLab65ToXyz65;
3165
+
3166
+ //#endregion
3167
+ //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/lab65/convertLab65ToRgb.js
3168
+ const convertLab65ToRgb = (lab) => convertXyz65ToRgb_default(convertLab65ToXyz65_default(lab));
3169
+ var convertLab65ToRgb_default = convertLab65ToRgb;
3170
+
3171
+ //#endregion
3172
+ //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/lab65/convertXyz65ToLab65.js
3173
+ const f = (value) => value > e ? Math.cbrt(value) : (k * value + 16) / 116;
3174
+ const convertXyz65ToLab65 = ({ x, y, z, alpha }) => {
3175
+ if (x === void 0) x = 0;
3176
+ if (y === void 0) y = 0;
3177
+ if (z === void 0) z = 0;
3178
+ let f0 = f(x / D65.X);
3179
+ let f1 = f(y / D65.Y);
3180
+ let f2 = f(z / D65.Z);
3181
+ let res = {
3182
+ mode: "lab65",
3183
+ l: 116 * f1 - 16,
3184
+ a: 500 * (f0 - f1),
3185
+ b: 200 * (f1 - f2)
3186
+ };
3187
+ if (alpha !== void 0) res.alpha = alpha;
3188
+ return res;
3189
+ };
3190
+ var convertXyz65ToLab65_default = convertXyz65ToLab65;
3191
+
3192
+ //#endregion
3193
+ //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/lab65/convertRgbToLab65.js
3194
+ const convertRgbToLab65 = (rgb$2) => {
3195
+ let res = convertXyz65ToLab65_default(convertRgbToXyz65_default(rgb$2));
3196
+ if (rgb$2.r === rgb$2.b && rgb$2.b === rgb$2.g) res.a = res.b = 0;
3197
+ return res;
3198
+ };
3199
+ var convertRgbToLab65_default = convertRgbToLab65;
3200
+
3201
+ //#endregion
3202
+ //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/lab65/definition.js
3203
+ const definition$9 = {
3204
+ ...definition_default$4,
3205
+ mode: "lab65",
3206
+ parse: ["--lab-d65"],
3207
+ serialize: "--lab-d65",
3208
+ toMode: {
3209
+ xyz65: convertLab65ToXyz65_default,
3210
+ rgb: convertLab65ToRgb_default
3211
+ },
3212
+ fromMode: {
3213
+ xyz65: convertXyz65ToLab65_default,
3214
+ rgb: convertRgbToLab65_default
3215
+ },
3216
+ ranges: {
3217
+ l: [0, 100],
3218
+ a: [-86.182, 98.234],
3219
+ b: [-107.86, 94.477]
3220
+ }
3221
+ };
3222
+ var definition_default$5 = definition$9;
3072
3223
 
3073
3224
  //#endregion
3074
3225
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/lch/convertLabToLch.js
@@ -3162,19 +3313,19 @@ const definition$8 = {
3162
3313
  difference: { h: differenceHueChroma },
3163
3314
  average: { h: averageAngle }
3164
3315
  };
3165
- var definition_default$5 = definition$8;
3316
+ var definition_default$6 = definition$8;
3166
3317
 
3167
3318
  //#endregion
3168
3319
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/lrgb/definition.js
3169
3320
  const definition$7 = {
3170
- ...definition_default$12,
3321
+ ...definition_default$13,
3171
3322
  mode: "lrgb",
3172
3323
  toMode: { rgb: convertLrgbToRgb_default },
3173
3324
  fromMode: { rgb: convertRgbToLrgb_default },
3174
3325
  parse: ["srgb-linear"],
3175
3326
  serialize: "srgb-linear"
3176
3327
  };
3177
- var definition_default$6 = definition$7;
3328
+ var definition_default$7 = definition$7;
3178
3329
 
3179
3330
  //#endregion
3180
3331
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/oklab/convertOklabToLrgb.js
@@ -3266,7 +3417,7 @@ const definition$6 = {
3266
3417
  parse: [parseOklab_default],
3267
3418
  serialize: (c$2) => `oklab(${c$2.l !== void 0 ? c$2.l : "none"} ${c$2.a !== void 0 ? c$2.a : "none"} ${c$2.b !== void 0 ? c$2.b : "none"}${c$2.alpha < 1 ? ` / ${c$2.alpha}` : ""})`
3268
3419
  };
3269
- var definition_default$7 = definition$6;
3420
+ var definition_default$8 = definition$6;
3270
3421
 
3271
3422
  //#endregion
3272
3423
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/oklch/parseOklch.js
@@ -3291,7 +3442,7 @@ var parseOklch_default = parseOklch;
3291
3442
  //#endregion
3292
3443
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/oklch/definition.js
3293
3444
  const definition$5 = {
3294
- ...definition_default$5,
3445
+ ...definition_default$6,
3295
3446
  mode: "oklch",
3296
3447
  toMode: {
3297
3448
  oklab: (c$2) => convertLchToLab_default(c$2, "oklab"),
@@ -3309,7 +3460,7 @@ const definition$5 = {
3309
3460
  h: [0, 360]
3310
3461
  }
3311
3462
  };
3312
- var definition_default$8 = definition$5;
3463
+ var definition_default$9 = definition$5;
3313
3464
 
3314
3465
  //#endregion
3315
3466
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/p3/convertP3ToXyz65.js
@@ -3345,7 +3496,7 @@ var convertXyz65ToP3_default = convertXyz65ToP3;
3345
3496
  //#endregion
3346
3497
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/p3/definition.js
3347
3498
  const definition$4 = {
3348
- ...definition_default$12,
3499
+ ...definition_default$13,
3349
3500
  mode: "p3",
3350
3501
  parse: ["display-p3"],
3351
3502
  serialize: "display-p3",
@@ -3358,7 +3509,7 @@ const definition$4 = {
3358
3509
  xyz65: convertP3ToXyz65_default
3359
3510
  }
3360
3511
  };
3361
- var definition_default$9 = definition$4;
3512
+ var definition_default$10 = definition$4;
3362
3513
 
3363
3514
  //#endregion
3364
3515
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/prophoto/convertXyz50ToProphoto.js
@@ -3407,7 +3558,7 @@ var convertProphotoToXyz50_default = convertProphotoToXyz50;
3407
3558
  //#endregion
3408
3559
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/prophoto/definition.js
3409
3560
  const definition$3 = {
3410
- ...definition_default$12,
3561
+ ...definition_default$13,
3411
3562
  mode: "prophoto",
3412
3563
  parse: ["prophoto-rgb"],
3413
3564
  serialize: "prophoto-rgb",
@@ -3420,7 +3571,7 @@ const definition$3 = {
3420
3571
  rgb: (color) => convertXyz50ToRgb_default(convertProphotoToXyz50_default(color))
3421
3572
  }
3422
3573
  };
3423
- var definition_default$10 = definition$3;
3574
+ var definition_default$11 = definition$3;
3424
3575
 
3425
3576
  //#endregion
3426
3577
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/rec2020/convertXyz65ToRec2020.js
@@ -3473,7 +3624,7 @@ var convertRec2020ToXyz65_default = convertRec2020ToXyz65;
3473
3624
  //#endregion
3474
3625
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/rec2020/definition.js
3475
3626
  const definition$2 = {
3476
- ...definition_default$12,
3627
+ ...definition_default$13,
3477
3628
  mode: "rec2020",
3478
3629
  fromMode: {
3479
3630
  xyz65: convertXyz65ToRec2020_default,
@@ -3486,7 +3637,7 @@ const definition$2 = {
3486
3637
  parse: ["rec2020"],
3487
3638
  serialize: "rec2020"
3488
3639
  };
3489
- var definition_default$11 = definition$2;
3640
+ var definition_default$12 = definition$2;
3490
3641
 
3491
3642
  //#endregion
3492
3643
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/xyz50/definition.js
@@ -3523,7 +3674,7 @@ const definition$1 = {
3523
3674
  }
3524
3675
  }
3525
3676
  };
3526
- var definition_default$13 = definition$1;
3677
+ var definition_default$14 = definition$1;
3527
3678
 
3528
3679
  //#endregion
3529
3680
  //#region ../../node_modules/.pnpm/culori@4.0.1/node_modules/culori/src/xyz65/convertXyz65ToXyz50.js
@@ -3596,7 +3747,7 @@ const definition = {
3596
3747
  }
3597
3748
  }
3598
3749
  };
3599
- var definition_default$14 = definition;
3750
+ var definition_default$15 = definition;
3600
3751
 
3601
3752
  //#endregion
3602
3753
  //#region ../token-tools/dist/css.js
@@ -3618,16 +3769,17 @@ const converters = {
3618
3769
  hsv: useMode(definition_default$2),
3619
3770
  hwb: useMode(definition_default$3),
3620
3771
  lab: useMode(definition_default$4),
3621
- lch: useMode(definition_default$5),
3622
- lrgb: useMode(definition_default$6),
3623
- oklab: useMode(definition_default$7),
3624
- oklch: useMode(definition_default$8),
3625
- p3: useMode(definition_default$9),
3626
- prophoto: useMode(definition_default$10),
3627
- rec2020: useMode(definition_default$11),
3628
- rgb: useMode(definition_default$12),
3629
- xyz50: useMode(definition_default$13),
3630
- xyz65: useMode(definition_default$14)
3772
+ lab65: useMode(definition_default$5),
3773
+ lch: useMode(definition_default$6),
3774
+ lrgb: useMode(definition_default$7),
3775
+ oklab: useMode(definition_default$8),
3776
+ oklch: useMode(definition_default$9),
3777
+ p3: useMode(definition_default$10),
3778
+ prophoto: useMode(definition_default$11),
3779
+ rec2020: useMode(definition_default$12),
3780
+ rgb: useMode(definition_default$13),
3781
+ xyz50: useMode(definition_default$14),
3782
+ xyz65: useMode(definition_default$15)
3631
3783
  };
3632
3784
 
3633
3785
  //#endregion
@@ -3735,11 +3887,11 @@ function wildcardMatch(pattern, options) {
3735
3887
  if (options.separator === "\\") throw new Error("\\ is not a valid separator because it is used for escaping. Try setting the separator to `true` instead");
3736
3888
  var regexpPattern = transform(pattern, options.separator);
3737
3889
  var regexp = new RegExp("^".concat(regexpPattern, "$"), options.flags);
3738
- var fn$4 = isMatch.bind(null, regexp);
3739
- fn$4.options = options;
3740
- fn$4.pattern = pattern;
3741
- fn$4.regexp = regexp;
3742
- return fn$4;
3890
+ var fn$5 = isMatch.bind(null, regexp);
3891
+ fn$5.options = options;
3892
+ fn$5.pattern = pattern;
3893
+ fn$5.regexp = regexp;
3894
+ return fn$5;
3743
3895
  }
3744
3896
 
3745
3897
  //#endregion