@pixerate/editor 0.145.0 → 0.147.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/README.md +4 -2
  2. package/THIRD_PARTY_NOTICES.md +1 -1
  3. package/dist/agent/index.cjs +36 -34
  4. package/dist/agent/index.js +7 -5
  5. package/dist/animation/index.cjs +5 -3
  6. package/dist/animation/index.js +4 -2
  7. package/dist/animation-editor/index.cjs +62 -60
  8. package/dist/animation-editor/index.js +6 -4
  9. package/dist/canvas/index.cjs +36 -34
  10. package/dist/canvas/index.js +19 -17
  11. package/dist/chart/index.cjs +88 -86
  12. package/dist/chart/index.js +7 -5
  13. package/dist/{chunk-WBJ6BG4R.js → chunk-2AQL4JHM.js} +6 -6
  14. package/dist/{chunk-HLMF3E53.cjs → chunk-2WDZI6QD.cjs} +15 -15
  15. package/dist/{chunk-ZNHB5RG6.js → chunk-37RLSNQ3.js} +2 -2
  16. package/dist/{chunk-5WOY52O6.cjs → chunk-4YQKRHMI.cjs} +8 -8
  17. package/dist/chunk-6ONMQ6WF.js +113 -0
  18. package/dist/{chunk-L434J57V.cjs → chunk-6QTON3VW.cjs} +16 -16
  19. package/dist/chunk-AA34BA7G.js +1913 -0
  20. package/dist/{chunk-QX25HWFL.js → chunk-AY65VQSU.js} +1 -1
  21. package/dist/{chunk-ONZJD2OD.cjs → chunk-BROJYMWU.cjs} +57 -153
  22. package/dist/{chunk-YM75DN54.js → chunk-DSZCDNTM.js} +1 -1
  23. package/dist/{chunk-PUR6BZFA.cjs → chunk-DVLMW3GB.cjs} +53 -53
  24. package/dist/{chunk-ALUWD3FG.js → chunk-EIUTJPEL.js} +1 -1
  25. package/dist/{chunk-X65C4DWV.js → chunk-EQ4SF4X4.js} +1 -1
  26. package/dist/{chunk-77SG47WT.js → chunk-FLOGD3QB.js} +1 -1
  27. package/dist/chunk-HRLT5BYO.js +133 -0
  28. package/dist/{chunk-AJSW5GMP.js → chunk-HVQVHUTV.js} +19 -115
  29. package/dist/{chunk-UR37VCIR.cjs → chunk-I4AHLP7F.cjs} +16 -35
  30. package/dist/chunk-IPJ3TEYR.cjs +113 -0
  31. package/dist/chunk-KC7HB5GF.cjs +133 -0
  32. package/dist/chunk-KY3FYKP3.js +52 -0
  33. package/dist/chunk-LEUZ4FRC.cjs +52 -0
  34. package/dist/{chunk-H6FX45CP.cjs → chunk-LIXLD433.cjs} +37 -37
  35. package/dist/{chunk-6GAYGQDC.js → chunk-O5ML2I6O.js} +3 -3
  36. package/dist/{chunk-KI2VBONS.js → chunk-OET45HIR.js} +2 -2
  37. package/dist/{chunk-XNZWATSB.cjs → chunk-QCEQIRJQ.cjs} +85 -85
  38. package/dist/{chunk-HRI3ZMDM.cjs → chunk-RHXW4TA5.cjs} +3 -3
  39. package/dist/{chunk-UUTTJK77.cjs → chunk-SUF6WRXR.cjs} +2 -2
  40. package/dist/{chunk-RN767PO6.js → chunk-SUVZJ2CP.js} +15 -34
  41. package/dist/{chunk-FLUTRPLY.cjs → chunk-TLMRGLQQ.cjs} +16 -16
  42. package/dist/{chunk-DAS7M4RY.js → chunk-UILRJQFD.js} +2 -2
  43. package/dist/chunk-UKCJ43YL.cjs +1913 -0
  44. package/dist/{chunk-XQ33O5BC.cjs → chunk-X35BV5YT.cjs} +44 -44
  45. package/dist/{chunk-6HMEHNWW.cjs → chunk-XTU6QO2W.cjs} +26 -26
  46. package/dist/{chunk-VM6JYWXQ.js → chunk-ZQUANEK4.js} +2 -2
  47. package/dist/cms/index.cjs +5 -3
  48. package/dist/cms/index.js +18 -16
  49. package/dist/color/contrast.d.cts +14 -0
  50. package/dist/color/contrast.d.ts +14 -0
  51. package/dist/color/convert.d.cts +30 -0
  52. package/dist/color/convert.d.ts +30 -0
  53. package/dist/color/dual.d.cts +98 -0
  54. package/dist/color/dual.d.ts +98 -0
  55. package/dist/color/format.d.cts +12 -0
  56. package/dist/color/format.d.ts +12 -0
  57. package/dist/color/gamut.d.cts +12 -0
  58. package/dist/color/gamut.d.ts +12 -0
  59. package/dist/color/harmony.d.cts +22 -0
  60. package/dist/color/harmony.d.ts +22 -0
  61. package/dist/color/index.cjs +115 -0
  62. package/dist/color/index.d.cts +18 -0
  63. package/dist/color/index.d.ts +18 -0
  64. package/dist/color/index.js +115 -0
  65. package/dist/color/mix.d.cts +11 -0
  66. package/dist/color/mix.d.ts +11 -0
  67. package/dist/color/named.d.cts +5 -0
  68. package/dist/color/named.d.ts +5 -0
  69. package/dist/color/parse.d.cts +11 -0
  70. package/dist/color/parse.d.ts +11 -0
  71. package/dist/color/picker.d.cts +52 -0
  72. package/dist/color/picker.d.ts +52 -0
  73. package/dist/color/recent.d.cts +8 -0
  74. package/dist/color/recent.d.ts +8 -0
  75. package/dist/color/tools.d.cts +15 -0
  76. package/dist/color/tools.d.ts +15 -0
  77. package/dist/color/types.d.cts +41 -0
  78. package/dist/color/types.d.ts +41 -0
  79. package/dist/color/vision.d.cts +36 -0
  80. package/dist/color/vision.d.ts +36 -0
  81. package/dist/diagram/editorDocument.d.cts +12 -0
  82. package/dist/diagram/editorDocument.d.ts +12 -0
  83. package/dist/diagram/index.cjs +35 -1
  84. package/dist/diagram/index.d.cts +1 -0
  85. package/dist/diagram/index.d.ts +1 -0
  86. package/dist/diagram/index.js +34 -0
  87. package/dist/export/index.cjs +6 -4
  88. package/dist/export/index.js +5 -3
  89. package/dist/extensions/index.cjs +10 -8
  90. package/dist/extensions/index.js +9 -7
  91. package/dist/gradient/controller.d.cts +109 -0
  92. package/dist/gradient/controller.d.ts +109 -0
  93. package/dist/gradient/editor.d.cts +38 -0
  94. package/dist/gradient/editor.d.ts +38 -0
  95. package/dist/gradient/index.cjs +1549 -0
  96. package/dist/gradient/index.d.cts +5 -0
  97. package/dist/gradient/index.d.ts +5 -0
  98. package/dist/gradient/index.js +1549 -0
  99. package/dist/gradient/model.d.cts +94 -0
  100. package/dist/gradient/model.d.ts +94 -0
  101. package/dist/gradient/tools.d.cts +11 -0
  102. package/dist/gradient/tools.d.ts +11 -0
  103. package/dist/gradient/types.d.cts +44 -0
  104. package/dist/gradient/types.d.ts +44 -0
  105. package/dist/image-editor/index.cjs +649 -647
  106. package/dist/image-editor/index.js +6 -4
  107. package/dist/index.cjs +19 -17
  108. package/dist/index.js +16 -14
  109. package/dist/paint-editor/color.d.cts +3 -13
  110. package/dist/paint-editor/color.d.ts +3 -13
  111. package/dist/paint-editor/index.cjs +23 -68
  112. package/dist/paint-editor/index.js +15 -60
  113. package/dist/persistence/documentStore.d.cts +51 -0
  114. package/dist/persistence/documentStore.d.ts +51 -0
  115. package/dist/persistence/documentTools.d.cts +35 -0
  116. package/dist/persistence/documentTools.d.ts +35 -0
  117. package/dist/persistence/editorAutosave.d.cts +33 -0
  118. package/dist/persistence/editorAutosave.d.ts +33 -0
  119. package/dist/persistence/editorDocument.d.cts +118 -0
  120. package/dist/persistence/editorDocument.d.ts +118 -0
  121. package/dist/persistence/index.cjs +294 -1
  122. package/dist/persistence/index.d.cts +4 -0
  123. package/dist/persistence/index.d.ts +4 -0
  124. package/dist/persistence/index.js +293 -0
  125. package/dist/vector/index.cjs +950 -948
  126. package/dist/vector/index.js +5 -3
  127. package/dist/video-editor/index.cjs +5 -3
  128. package/dist/video-editor/index.js +4 -2
  129. package/package.json +21 -1
  130. package/skills/README.md +1 -0
  131. package/skills/pixerate-agent-tools/SKILL.md +21 -0
  132. package/skills/pixerate-color/SKILL.md +69 -0
  133. package/skills/pixerate-diagram/SKILL.md +13 -0
  134. package/dist/chunk-45VRG4RB.js +0 -65
  135. package/dist/chunk-5FXOR7F2.cjs +0 -65
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-5UJHB3BW.js";
5
5
  import {
6
6
  mixColorsOklab
7
- } from "./chunk-45VRG4RB.js";
7
+ } from "./chunk-KY3FYKP3.js";
8
8
 
9
9
  // src/animation/keyframes.ts
10
10
  var ANIMATION_TIME_EPSILON = 1e-6;
@@ -3,101 +3,20 @@
3
3
 
4
4
  var _chunkXFM3OCHUcjs = require('./chunk-XFM3OCHU.cjs');
5
5
 
6
- // src/cms/math.ts
7
- var D50 = [0.9642, 1, 0.8249];
8
- var D65_XY = [0.3127, 0.329];
9
- var IDENTITY = [
10
- [1, 0, 0],
11
- [0, 1, 0],
12
- [0, 0, 1]
13
- ];
14
- function mul(a, b) {
15
- const o = [
16
- [0, 0, 0],
17
- [0, 0, 0],
18
- [0, 0, 0]
19
- ];
20
- for (let i = 0; i < 3; i++) for (let j = 0; j < 3; j++) o[i][j] = a[i][0] * b[0][j] + a[i][1] * b[1][j] + a[i][2] * b[2][j];
21
- return o;
22
- }
23
- function apply(m, v) {
24
- return [m[0][0] * v[0] + m[0][1] * v[1] + m[0][2] * v[2], m[1][0] * v[0] + m[1][1] * v[1] + m[1][2] * v[2], m[2][0] * v[0] + m[2][1] * v[1] + m[2][2] * v[2]];
25
- }
26
- function det(m) {
27
- return m[0][0] * (m[1][1] * m[2][2] - m[1][2] * m[2][1]) - m[0][1] * (m[1][0] * m[2][2] - m[1][2] * m[2][0]) + m[0][2] * (m[1][0] * m[2][1] - m[1][1] * m[2][0]);
28
- }
29
- function invert(m) {
30
- const d = det(m);
31
- if (!Number.isFinite(d) || Math.abs(d) < 1e-12) return null;
32
- const k = 1 / d;
33
- return [
34
- [(m[1][1] * m[2][2] - m[1][2] * m[2][1]) * k, (m[0][2] * m[2][1] - m[0][1] * m[2][2]) * k, (m[0][1] * m[1][2] - m[0][2] * m[1][1]) * k],
35
- [(m[1][2] * m[2][0] - m[1][0] * m[2][2]) * k, (m[0][0] * m[2][2] - m[0][2] * m[2][0]) * k, (m[0][2] * m[1][0] - m[0][0] * m[1][2]) * k],
36
- [(m[1][0] * m[2][1] - m[1][1] * m[2][0]) * k, (m[0][1] * m[2][0] - m[0][0] * m[2][1]) * k, (m[0][0] * m[1][1] - m[0][1] * m[1][0]) * k]
37
- ];
38
- }
39
- function xyToXyz(xy) {
40
- const [x, y] = xy;
41
- return [x / y, 1, (1 - x - y) / y];
42
- }
43
- var BRADFORD = [
44
- [0.8951, 0.2664, -0.1614],
45
- [-0.7502, 1.7135, 0.0367],
46
- [0.0389, -0.0685, 1.0296]
47
- ];
48
- function bradford(src, dst) {
49
- const inv = invert(BRADFORD);
50
- const s = apply(BRADFORD, src);
51
- const d = apply(BRADFORD, dst);
52
- const scale = [
53
- [d[0] / s[0], 0, 0],
54
- [0, d[1] / s[1], 0],
55
- [0, 0, d[2] / s[2]]
56
- ];
57
- return mul(inv, mul(scale, BRADFORD));
58
- }
59
- function rgbToXyzMatrix(r, g, b, white) {
60
- const xr = xyToXyz(r);
61
- const xg = xyToXyz(g);
62
- const xb = xyToXyz(b);
63
- const m = [
64
- [xr[0], xg[0], xb[0]],
65
- [xr[1], xg[1], xb[1]],
66
- [xr[2], xg[2], xb[2]]
67
- ];
68
- const inv = invert(m);
69
- if (!inv) return null;
70
- const s = apply(inv, white);
71
- return [
72
- [m[0][0] * s[0], m[0][1] * s[1], m[0][2] * s[2]],
73
- [m[1][0] * s[0], m[1][1] * s[1], m[1][2] * s[2]],
74
- [m[2][0] * s[0], m[2][1] * s[1], m[2][2] * s[2]]
75
- ];
76
- }
77
- var EPS = 216 / 24389;
78
- var KAPPA = 24389 / 27;
79
- var labF = (t) => t > EPS ? Math.cbrt(t) : (KAPPA * t + 16) / 116;
80
- var labFinv = (f) => {
81
- const f3 = f * f * f;
82
- return f3 > EPS ? f3 : (116 * f - 16) / KAPPA;
83
- };
84
- function xyzToLab(xyz, white = D50) {
85
- const fx = labF(xyz[0] / white[0]);
86
- const fy = labF(xyz[1] / white[1]);
87
- const fz = labF(xyz[2] / white[2]);
88
- return [116 * fy - 16, 500 * (fx - fy), 200 * (fy - fz)];
89
- }
90
- function labToXyz(lab, white = D50) {
91
- const fy = (lab[0] + 16) / 116;
92
- const fx = fy + lab[1] / 500;
93
- const fz = fy - lab[2] / 200;
94
- return [labFinv(fx) * white[0], labFinv(fy) * white[1], labFinv(fz) * white[2]];
95
- }
96
- function deltaE76(a, b) {
97
- return Math.hypot(a[0] - b[0], a[1] - b[1], a[2] - b[2]);
98
- }
99
- var s15f16Round = (v) => Math.round(v * 65536) / 65536;
100
- var d50Quantized = () => [s15f16Round(D50[0]), s15f16Round(D50[1]), s15f16Round(D50[2])];
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+ var _chunkIPJ3TEYRcjs = require('./chunk-IPJ3TEYR.cjs');
101
20
 
102
21
  // src/cms/curve.ts
103
22
  var IDENTITY_CURVE = { type: "identity" };
@@ -466,8 +385,8 @@ function matrix3(m) {
466
385
  function stageOutputs(s, n) {
467
386
  return s.kind === "matrix" ? s.rows : s.kind === "clut" ? s.clut.outputs : n;
468
387
  }
469
- var EPS2 = 216 / 24389;
470
- var KAPPA2 = 24389 / 27;
388
+ var EPS = 216 / 24389;
389
+ var KAPPA = 24389 / 27;
471
390
  function runStage(s, v, n, tmp, tmpIn, tmpOut) {
472
391
  switch (s.kind) {
473
392
  case "curves":
@@ -498,18 +417,18 @@ function runStage(s, v, n, tmp, tmpIn, tmpOut) {
498
417
  const fz = fy - v[2] / 200;
499
418
  const finv = (f) => {
500
419
  const f3 = f * f * f;
501
- return f3 > EPS2 ? f3 : (116 * f - 16) / KAPPA2;
420
+ return f3 > EPS ? f3 : (116 * f - 16) / KAPPA;
502
421
  };
503
- v[0] = finv(fx) * D50[0];
504
- v[1] = finv(fy) * D50[1];
505
- v[2] = finv(fz) * D50[2];
422
+ v[0] = finv(fx) * _chunkIPJ3TEYRcjs.D50[0];
423
+ v[1] = finv(fy) * _chunkIPJ3TEYRcjs.D50[1];
424
+ v[2] = finv(fz) * _chunkIPJ3TEYRcjs.D50[2];
506
425
  return 3;
507
426
  }
508
427
  case "xyz-to-lab": {
509
- const f = (t) => t > EPS2 ? Math.cbrt(t) : (KAPPA2 * t + 16) / 116;
510
- const fx = f(Math.max(0, v[0]) / D50[0]);
511
- const fy = f(Math.max(0, v[1]) / D50[1]);
512
- const fz = f(Math.max(0, v[2]) / D50[2]);
428
+ const f = (t) => t > EPS ? Math.cbrt(t) : (KAPPA * t + 16) / 116;
429
+ const fx = f(Math.max(0, v[0]) / _chunkIPJ3TEYRcjs.D50[0]);
430
+ const fy = f(Math.max(0, v[1]) / _chunkIPJ3TEYRcjs.D50[1]);
431
+ const fz = f(Math.max(0, v[2]) / _chunkIPJ3TEYRcjs.D50[2]);
513
432
  v[0] = 116 * fy - 16;
514
433
  v[1] = 500 * (fx - fy);
515
434
  v[2] = 200 * (fy - fz);
@@ -666,7 +585,7 @@ function profileChannels(p) {
666
585
  }
667
586
  var SAME_COLORS_MAX_DELTA_E = 0.5;
668
587
  function mediaWhite(p) {
669
- if (p.version[0] < 4 && p.profileClass === "display") return [D50[0], D50[1], D50[2]];
588
+ if (p.version[0] < 4 && p.profileClass === "display") return [_chunkIPJ3TEYRcjs.D50[0], _chunkIPJ3TEYRcjs.D50[1], _chunkIPJ3TEYRcjs.D50[2]];
670
589
  return p.whitePoint;
671
590
  }
672
591
  function isMatrixShaper(p) {
@@ -698,7 +617,7 @@ function deviceToPcs(p, intent) {
698
617
  case "gray": {
699
618
  if (!p.grayTrc) throw new CmsError("gray profile without kTRC");
700
619
  if (p.pcs === "lab") return { stages: [{ kind: "curves", curves: [p.grayTrc] }, { kind: "matrix", rows: 3, cols: 1, m: [100, 0, 0], offset: [0, 0, 0] }], pcs: "lab" };
701
- return { stages: [{ kind: "curves", curves: [p.grayTrc] }, { kind: "matrix", rows: 3, cols: 1, m: [D50[0], D50[1], D50[2]], offset: [0, 0, 0] }], pcs: "xyz" };
620
+ return { stages: [{ kind: "curves", curves: [p.grayTrc] }, { kind: "matrix", rows: 3, cols: 1, m: [_chunkIPJ3TEYRcjs.D50[0], _chunkIPJ3TEYRcjs.D50[1], _chunkIPJ3TEYRcjs.D50[2]], offset: [0, 0, 0] }], pcs: "xyz" };
702
621
  }
703
622
  case "lab":
704
623
  return { stages: [{ kind: "decode-lab-v4" }], pcs: "lab" };
@@ -714,7 +633,7 @@ function pcsToDevice(p, intent) {
714
633
  switch (p.colorSpace) {
715
634
  case "rgb": {
716
635
  if (!p.matrix || !p.trc) throw new CmsError("RGB profile without matrix/TRC or BToA tags");
717
- const inv = invert(p.matrix);
636
+ const inv = _chunkIPJ3TEYRcjs.invert.call(void 0, p.matrix);
718
637
  if (!inv) throw new CmsError("singular colorant matrix");
719
638
  return { stages: [matrix3(inv), { kind: "inv-curves", curves: [...p.trc] }], pcs: "xyz" };
720
639
  }
@@ -741,7 +660,7 @@ function canBeDestination(p) {
741
660
  }
742
661
  function grayAsRgb(p) {
743
662
  if (!p.grayTrc || p.pcs !== "xyz") return null;
744
- const w = D50;
663
+ const w = _chunkIPJ3TEYRcjs.D50;
745
664
  const c = p.grayTrc;
746
665
  return {
747
666
  ...p,
@@ -830,7 +749,7 @@ function parseProfile(bytes) {
830
749
  const d = tagData(sig);
831
750
  return d ? parseCurve(d)[0] : null;
832
751
  };
833
- const whitePoint = _nullishCoalesce(xyzTag("wtpt"), () => ( [D50[0], D50[1], D50[2]]));
752
+ const whitePoint = _nullishCoalesce(xyzTag("wtpt"), () => ( [_chunkIPJ3TEYRcjs.D50[0], _chunkIPJ3TEYRcjs.D50[1], _chunkIPJ3TEYRcjs.D50[2]]));
834
753
  let blackPoint2 = null;
835
754
  try {
836
755
  blackPoint2 = xyzTag("bkpt");
@@ -1360,7 +1279,7 @@ function encodeProfile(p) {
1360
1279
  o.ascii("acsp");
1361
1280
  for (let k = 0; k < 6; k++) o.u32(0);
1362
1281
  o.u32(intentCode(p.renderingIntent));
1363
- for (const v of D50) o.s15(v);
1282
+ for (const v of _chunkIPJ3TEYRcjs.D50) o.s15(v);
1364
1283
  o.u32(0);
1365
1284
  while (o.length < 128) o.u8(0);
1366
1285
  o.u32(entries.length);
@@ -1664,11 +1583,11 @@ function connection(src, dst, intent, bpc) {
1664
1583
  const scale = [1, 1, 1];
1665
1584
  const offset = [0, 0, 0];
1666
1585
  for (let i = 0; i < 3; i++) {
1667
- const s = bs * D50[i];
1668
- const d = bd * D50[i];
1669
- const a = (D50[i] - d) / (D50[i] - s);
1586
+ const s = bs * _chunkIPJ3TEYRcjs.D50[i];
1587
+ const d = bd * _chunkIPJ3TEYRcjs.D50[i];
1588
+ const a = (_chunkIPJ3TEYRcjs.D50[i] - d) / (_chunkIPJ3TEYRcjs.D50[i] - s);
1670
1589
  scale[i] = a;
1671
- offset[i] = D50[i] * (1 - a);
1590
+ offset[i] = _chunkIPJ3TEYRcjs.D50[i] * (1 - a);
1672
1591
  }
1673
1592
  return { scale, offset };
1674
1593
  }
@@ -1680,7 +1599,7 @@ function blackPoint(p, intent) {
1680
1599
  const pcsY = (st, pcs, dev) => {
1681
1600
  const out = new Float32Array(16);
1682
1601
  new Pipeline(n, st.slice()).eval(dev, out);
1683
- const y = pcs === "xyz" ? out[1] : labToXyz([out[0], 0, 0])[1];
1602
+ const y = pcs === "xyz" ? out[1] : _chunkIPJ3TEYRcjs.labToXyz.call(void 0, [out[0], 0, 0])[1];
1684
1603
  return Math.min(0.5, Math.max(0, y));
1685
1604
  };
1686
1605
  const to = deviceToPcs(p, intent);
@@ -1746,7 +1665,7 @@ function sameColors(a, b, lab) {
1746
1665
  }
1747
1666
  ta.eval(input, la);
1748
1667
  tb.eval(input, lb);
1749
- if (deltaE76(decode(la), decode(lb)) > 0.5) return false;
1668
+ if (_chunkIPJ3TEYRcjs.deltaE76.call(void 0, decode(la), decode(lb)) > 0.5) return false;
1750
1669
  }
1751
1670
  return true;
1752
1671
  }
@@ -1862,7 +1781,7 @@ var YN = 2;
1862
1781
  var CmykModel = (_class5 = class {
1863
1782
  constructor(tvi) {;_class5.prototype.__init14.call(this);
1864
1783
  this.tvi = tvi;
1865
- const lab = (l, a, b) => labToXyz([l, a, b]);
1784
+ const lab = (l, a, b) => _chunkIPJ3TEYRcjs.labToXyz.call(void 0, [l, a, b]);
1866
1785
  const w = lab(95, 0, -2);
1867
1786
  const base = [
1868
1787
  w,
@@ -1916,7 +1835,7 @@ var CmykModel = (_class5 = class {
1916
1835
  }
1917
1836
  lab(cmyk) {
1918
1837
  const x = this.xyz(cmyk);
1919
- return xyzToLab([x[0] * D50[0] / this.paper[0], x[1] * D50[1] / this.paper[1], x[2] * D50[2] / this.paper[2]]);
1838
+ return _chunkIPJ3TEYRcjs.xyzToLab.call(void 0, [x[0] * _chunkIPJ3TEYRcjs.D50[0] / this.paper[0], x[1] * _chunkIPJ3TEYRcjs.D50[1] / this.paper[1], x[2] * _chunkIPJ3TEYRcjs.D50[2] / this.paper[2]]);
1920
1839
  }
1921
1840
  }, _class5);
1922
1841
  function solveCmy(model, target, k, limit, seeds) {
@@ -1974,12 +1893,12 @@ function solveCmy(model, target, k, limit, seeds) {
1974
1893
  [a[2][0], a[2][1], a[2][2]]
1975
1894
  ];
1976
1895
  for (let d = 0; d < 3; d++) al[d][d] += lambda * (1 + a[d][d]);
1977
- const inv = invert(al);
1896
+ const inv = _chunkIPJ3TEYRcjs.invert.call(void 0, al);
1978
1897
  if (!inv) {
1979
1898
  lambda *= 10;
1980
1899
  continue;
1981
1900
  }
1982
- const step = apply(inv, g);
1901
+ const step = _chunkIPJ3TEYRcjs.apply.call(void 0, inv, g);
1983
1902
  const xn = project([x[0] + step[0], x[1] + step[1], x[2] + step[2]]);
1984
1903
  const en = err(xn);
1985
1904
  const fnew = norm2(en);
@@ -2143,7 +2062,7 @@ function cmykProfile(p = DEFAULT_CMYK_PARAMS, copyright = "") {
2143
2062
  renderingIntent: "perceptual",
2144
2063
  description: p.description,
2145
2064
  copyright,
2146
- whitePoint: model.paper.map(s15f16Round),
2065
+ whitePoint: model.paper.map(_chunkIPJ3TEYRcjs.s15f16Round),
2147
2066
  blackPoint: null,
2148
2067
  chad: null,
2149
2068
  matrix: null,
@@ -2199,25 +2118,25 @@ function builtinProfileId(s) {
2199
2118
  return _nullishCoalesce(_nullishCoalesce(aliases[n], () => ( _optionalChain([BUILTIN_PROFILES, 'access', _23 => _23.find, 'call', _24 => _24((b) => b.description.toLowerCase() === s.toLowerCase()), 'optionalAccess', _25 => _25.id]))), () => ( null));
2200
2119
  }
2201
2120
  function colorants(r, g, b, white) {
2202
- const m = rgbToXyzMatrix(r, g, b, white);
2203
- const d50 = d50Quantized();
2204
- const nearD50 = Math.abs(white[0] - D50[0]) < 1e-3 && Math.abs(white[2] - D50[2]) < 1e-3;
2205
- const adapt = nearD50 ? null : bradford(white, D50);
2121
+ const m = _chunkIPJ3TEYRcjs.rgbToXyzMatrix.call(void 0, r, g, b, white);
2122
+ const d50 = _chunkIPJ3TEYRcjs.d50Quantized.call(void 0, );
2123
+ const nearD50 = Math.abs(white[0] - _chunkIPJ3TEYRcjs.D50[0]) < 1e-3 && Math.abs(white[2] - _chunkIPJ3TEYRcjs.D50[2]) < 1e-3;
2124
+ const adapt = nearD50 ? null : _chunkIPJ3TEYRcjs.bradford.call(void 0, white, _chunkIPJ3TEYRcjs.D50);
2206
2125
  let m50;
2207
- if (adapt) m50 = mul(adapt, m);
2126
+ if (adapt) m50 = _chunkIPJ3TEYRcjs.mul.call(void 0, adapt, m);
2208
2127
  else {
2209
- const s = apply(m, [1, 1, 1]);
2210
- m50 = m.map((row, i) => row.map((v) => v * D50[i] / s[i]));
2128
+ const s = _chunkIPJ3TEYRcjs.apply.call(void 0, m, [1, 1, 1]);
2129
+ m50 = m.map((row, i) => row.map((v) => v * _chunkIPJ3TEYRcjs.D50[i] / s[i]));
2211
2130
  }
2212
- const q = m50.map((row) => row.map(s15f16Round));
2131
+ const q = m50.map((row) => row.map(_chunkIPJ3TEYRcjs.s15f16Round));
2213
2132
  for (let i = 0; i < 3; i++) {
2214
2133
  const row = q[i];
2215
2134
  const err = d50[i] - (row[0] + row[1] + row[2]);
2216
2135
  let k = 0;
2217
2136
  for (let j = 1; j < 3; j++) if (Math.abs(row[j]) > Math.abs(row[k])) k = j;
2218
- row[k] = s15f16Round(row[k] + err);
2137
+ row[k] = _chunkIPJ3TEYRcjs.s15f16Round.call(void 0, row[k] + err);
2219
2138
  }
2220
- return { m: q, chad: adapt ? adapt.map((row) => row.map(s15f16Round)) : null };
2139
+ return { m: q, chad: adapt ? adapt.map((row) => row.map(_chunkIPJ3TEYRcjs.s15f16Round)) : null };
2221
2140
  }
2222
2141
  var withBytes = (p) => ({ ...p, bytes: encodeProfile(p) });
2223
2142
  function rgbProfile(desc, prim, white, trc) {
@@ -2230,7 +2149,7 @@ function rgbProfile(desc, prim, white, trc) {
2230
2149
  renderingIntent: "perceptual",
2231
2150
  description: desc,
2232
2151
  copyright: BUILTIN_COPYRIGHT,
2233
- whitePoint: d50Quantized(),
2152
+ whitePoint: _chunkIPJ3TEYRcjs.d50Quantized.call(void 0, ),
2234
2153
  blackPoint: null,
2235
2154
  chad,
2236
2155
  matrix: m,
@@ -2250,7 +2169,7 @@ function grayProfile(desc, trc) {
2250
2169
  renderingIntent: "perceptual",
2251
2170
  description: desc,
2252
2171
  copyright: BUILTIN_COPYRIGHT,
2253
- whitePoint: d50Quantized(),
2172
+ whitePoint: _chunkIPJ3TEYRcjs.d50Quantized.call(void 0, ),
2254
2173
  blackPoint: null,
2255
2174
  chad: null,
2256
2175
  matrix: null,
@@ -2271,7 +2190,7 @@ function labProfile(desc) {
2271
2190
  renderingIntent: "perceptual",
2272
2191
  description: desc,
2273
2192
  copyright: BUILTIN_COPYRIGHT,
2274
- whitePoint: d50Quantized(),
2193
+ whitePoint: _chunkIPJ3TEYRcjs.d50Quantized.call(void 0, ),
2275
2194
  blackPoint: null,
2276
2195
  chad: null,
2277
2196
  matrix: null,
@@ -2284,7 +2203,7 @@ function labProfile(desc) {
2284
2203
  }
2285
2204
  function build(id) {
2286
2205
  const desc = BUILTIN_PROFILES.find((b) => b.id === id).description;
2287
- const d65 = xyToXyz(D65_XY);
2206
+ const d65 = _chunkIPJ3TEYRcjs.xyToXyz.call(void 0, _chunkIPJ3TEYRcjs.D65_XY);
2288
2207
  const srgbP = [
2289
2208
  [0.64, 0.33],
2290
2209
  [0.3, 0.6],
@@ -2298,7 +2217,7 @@ function build(id) {
2298
2217
  case "adobe-rgb-compat":
2299
2218
  return rgbProfile(desc, [[0.64, 0.33], [0.21, 0.71], [0.15, 0.06]], d65, gammaCurve(563 / 256));
2300
2219
  case "prophoto-compat":
2301
- return rgbProfile(desc, [[0.7347, 0.2653], [0.1596, 0.8404], [0.0366, 1e-4]], [D50[0], D50[1], D50[2]], gammaCurve(1.8));
2220
+ return rgbProfile(desc, [[0.7347, 0.2653], [0.1596, 0.8404], [0.0366, 1e-4]], [_chunkIPJ3TEYRcjs.D50[0], _chunkIPJ3TEYRcjs.D50[1], _chunkIPJ3TEYRcjs.D50[2]], gammaCurve(1.8));
2302
2221
  case "linear-srgb":
2303
2222
  return rgbProfile(desc, srgbP, d65, gammaCurve(1));
2304
2223
  case "rec2020": {
@@ -2555,19 +2474,4 @@ function writeJpegIcc(jpeg, icc) {
2555
2474
 
2556
2475
 
2557
2476
 
2558
-
2559
-
2560
-
2561
-
2562
-
2563
-
2564
-
2565
-
2566
-
2567
-
2568
-
2569
-
2570
-
2571
-
2572
-
2573
- exports.D50 = D50; exports.D65_XY = D65_XY; exports.IDENTITY = IDENTITY; exports.mul = mul; exports.apply = apply; exports.det = det; exports.invert = invert; exports.xyToXyz = xyToXyz; exports.bradford = bradford; exports.rgbToXyzMatrix = rgbToXyzMatrix; exports.xyzToLab = xyzToLab; exports.labToXyz = labToXyz; exports.deltaE76 = deltaE76; exports.s15f16Round = s15f16Round; exports.d50Quantized = d50Quantized; exports.IDENTITY_CURVE = IDENTITY_CURVE; exports.srgbTrc = srgbTrc; exports.gammaCurve = gammaCurve; exports.paramCount = paramCount; exports.isIdentityCurve = isIdentityCurve; exports.evalCurve = evalCurve; exports.evalCurveInverse = evalCurveInverse; exports.sampleCurve = sampleCurve; exports.MAX_CHANNELS = MAX_CHANNELS; exports.Clut = Clut; exports.MAX_PIPE = MAX_PIPE; exports.matrix3 = matrix3; exports.stageOutputs = stageOutputs; exports.Pipeline = Pipeline; exports.INTENTS = INTENTS; exports.intentCode = intentCode; exports.intentFromCode = intentFromCode; exports.CmsError = CmsError; exports.classSig = classSig; exports.spaceSig = spaceSig; exports.spaceChannels = spaceChannels; exports.profileChannels = profileChannels; exports.SAME_COLORS_MAX_DELTA_E = SAME_COLORS_MAX_DELTA_E; exports.mediaWhite = mediaWhite; exports.isMatrixShaper = isMatrixShaper; exports.supportsIntent = supportsIntent; exports.deviceToPcs = deviceToPcs; exports.pcsToDevice = pcsToDevice; exports.canBeDestination = canBeDestination; exports.grayAsRgb = grayAsRgb; exports.parseProfile = parseProfile; exports.encodeProfile = encodeProfile; exports.DEFAULT_TRANSFORM_OPTIONS = DEFAULT_TRANSFORM_OPTIONS; exports.Transform = Transform; exports.linkStages = linkStages; exports.blackPoint = blackPoint; exports.cachedTransform = cachedTransform; exports.sameColors = sameColors; exports.GamutCheck = GamutCheck; exports.Lut3d = Lut3d; exports.COATED_CMYK_DESCRIPTION = COATED_CMYK_DESCRIPTION; exports.DEFAULT_CMYK_PARAMS = DEFAULT_CMYK_PARAMS; exports.CmykModel = CmykModel; exports.separate = separate; exports.cmykProfile = cmykProfile; exports.BUILTIN_COPYRIGHT = BUILTIN_COPYRIGHT; exports.BUILTIN_PROFILES = BUILTIN_PROFILES; exports.builtinProfileId = builtinProfileId; exports.builtinProfile = builtinProfile; exports.srgbProfile = srgbProfile; exports.defaultProfileFor = defaultProfileFor; exports.readPngIcc = readPngIcc; exports.writePngIcc = writePngIcc; exports.readJpegIcc = readJpegIcc; exports.writeJpegIcc = writeJpegIcc;
2477
+ exports.IDENTITY_CURVE = IDENTITY_CURVE; exports.srgbTrc = srgbTrc; exports.gammaCurve = gammaCurve; exports.paramCount = paramCount; exports.isIdentityCurve = isIdentityCurve; exports.evalCurve = evalCurve; exports.evalCurveInverse = evalCurveInverse; exports.sampleCurve = sampleCurve; exports.MAX_CHANNELS = MAX_CHANNELS; exports.Clut = Clut; exports.MAX_PIPE = MAX_PIPE; exports.matrix3 = matrix3; exports.stageOutputs = stageOutputs; exports.Pipeline = Pipeline; exports.INTENTS = INTENTS; exports.intentCode = intentCode; exports.intentFromCode = intentFromCode; exports.CmsError = CmsError; exports.classSig = classSig; exports.spaceSig = spaceSig; exports.spaceChannels = spaceChannels; exports.profileChannels = profileChannels; exports.SAME_COLORS_MAX_DELTA_E = SAME_COLORS_MAX_DELTA_E; exports.mediaWhite = mediaWhite; exports.isMatrixShaper = isMatrixShaper; exports.supportsIntent = supportsIntent; exports.deviceToPcs = deviceToPcs; exports.pcsToDevice = pcsToDevice; exports.canBeDestination = canBeDestination; exports.grayAsRgb = grayAsRgb; exports.parseProfile = parseProfile; exports.encodeProfile = encodeProfile; exports.DEFAULT_TRANSFORM_OPTIONS = DEFAULT_TRANSFORM_OPTIONS; exports.Transform = Transform; exports.linkStages = linkStages; exports.blackPoint = blackPoint; exports.cachedTransform = cachedTransform; exports.sameColors = sameColors; exports.GamutCheck = GamutCheck; exports.Lut3d = Lut3d; exports.COATED_CMYK_DESCRIPTION = COATED_CMYK_DESCRIPTION; exports.DEFAULT_CMYK_PARAMS = DEFAULT_CMYK_PARAMS; exports.CmykModel = CmykModel; exports.separate = separate; exports.cmykProfile = cmykProfile; exports.BUILTIN_COPYRIGHT = BUILTIN_COPYRIGHT; exports.BUILTIN_PROFILES = BUILTIN_PROFILES; exports.builtinProfileId = builtinProfileId; exports.builtinProfile = builtinProfile; exports.srgbProfile = srgbProfile; exports.defaultProfileFor = defaultProfileFor; exports.readPngIcc = readPngIcc; exports.writePngIcc = writePngIcc; exports.readJpegIcc = readJpegIcc; exports.writeJpegIcc = writeJpegIcc;
@@ -7,7 +7,7 @@ import {
7
7
  chartSeriesColor,
8
8
  chartSeriesType,
9
9
  chartSliceColor
10
- } from "./chunk-RN767PO6.js";
10
+ } from "./chunk-SUVZJ2CP.js";
11
11
  import {
12
12
  NumberFormat
13
13
  } from "./chunk-II2WIF5Z.js";